diff options
author | David Rothstein <drothstein@gmail.com> | 2014-11-01 16:26:40 -0400 |
---|---|---|
committer | David Rothstein <drothstein@gmail.com> | 2014-11-01 16:26:40 -0400 |
commit | 62c952c6e4cad7ac18ee8aea6791f4f0d1117231 (patch) | |
tree | f19491c50ebee37d32131cb325641ed809f046b4 /modules/system/system.admin.inc | |
parent | e9bca3a0c23b5230fb3c73280f413bb5169eb4a3 (diff) | |
download | brdo-62c952c6e4cad7ac18ee8aea6791f4f0d1117231.tar.gz brdo-62c952c6e4cad7ac18ee8aea6791f4f0d1117231.tar.bz2 |
Issue #1183708 by Liam Morland | onair1: Fixed Notice: Undefined index: favicon_path in system_theme_settings_validate().
Diffstat (limited to 'modules/system/system.admin.inc')
-rw-r--r-- | modules/system/system.admin.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index b6f67890d..22c202c3f 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -640,13 +640,13 @@ function system_theme_settings_validate($form, &$form_state) { // If the user provided a path for a logo or favicon file, make sure a file // exists at that path. - if ($form_state['values']['logo_path']) { + if (!empty($form_state['values']['logo_path'])) { $path = _system_theme_settings_validate_path($form_state['values']['logo_path']); if (!$path) { form_set_error('logo_path', t('The custom logo path is invalid.')); } } - if ($form_state['values']['favicon_path']) { + if (!empty($form_state['values']['favicon_path'])) { $path = _system_theme_settings_validate_path($form_state['values']['favicon_path']); if (!$path) { form_set_error('favicon_path', t('The custom favicon path is invalid.')); @@ -703,14 +703,16 @@ function system_theme_settings_submit($form, &$form_state) { // If the user uploaded a new logo or favicon, save it to a permanent location // and use it in place of the default theme-provided file. - if ($file = $values['logo_upload']) { + if (!empty($values['logo_upload'])) { + $file = $values['logo_upload']; unset($values['logo_upload']); $filename = file_unmanaged_copy($file->uri); $values['default_logo'] = 0; $values['logo_path'] = $filename; $values['toggle_logo'] = 1; } - if ($file = $values['favicon_upload']) { + if (!empty($values['favicon_upload'])) { + $file = $values['favicon_upload']; unset($values['favicon_upload']); $filename = file_unmanaged_copy($file->uri); $values['default_favicon'] = 0; |