When defaulting the setting in theme_get_setting for the favicon, check for a favicon setting in the global settings:

if(exist($cache[''])) {
    $cache[$theme]['favicon'] = file_create_url($cache['']['favicon']);
} else {
    $cache[$theme]['favicon'] = file_create_url('misc/favicon.ico');
}

Instead of:

$cache[$theme]['favicon'] = file_create_url('misc/favicon.ico');

Comments

nickcaballero’s picture

if(empty($cache[''])) {

nickcaballero’s picture

This seems to work:

            if(!empty($cache['']) && $theme != '') {
               if(!$cache['']['default_favicon']) {
                  $cache[$theme]['favicon'] = file_create_url($cache['']['favicon_path']);
               } else {
                  $cache[$theme]['favicon'] = file_create_url('misc/favicon.ico');
               }
            } else {
               $cache[$theme]['favicon'] = file_create_url('misc/favicon.ico');
            }
nickcaballero’s picture

That didn't work either. I'm not sure if this is safe but this actually works:

            if($theme != '') {
               $cache[$theme]['favicon'] = file_create_url(theme_get_setting('favicon_path',''));
            } else {
               $cache[$theme]['favicon'] = file_create_url('misc/favicon.ico');
            }