Unserialize empty arrays.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
aad8c71bb1
commit
8c9c4e1556
|
@ -348,8 +348,10 @@ function get_settings($setting) {
|
||||||
$cache_nonexistantoptions[$setting] = true;
|
$cache_nonexistantoptions[$setting] = true;
|
||||||
return false;
|
return false;
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
if (@ $kellogs = unserialize($option) ) return $kellogs;
|
@ $kellogs = unserialize($option);
|
||||||
|
if ($kellogs !== FALSE)
|
||||||
|
return $kellogs;
|
||||||
else return $option;
|
else return $option;
|
||||||
endif;
|
endif;
|
||||||
}
|
}
|
||||||
|
@ -378,9 +380,9 @@ function get_alloptions() {
|
||||||
if ('siteurl' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value);
|
if ('siteurl' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value);
|
||||||
if ('home' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value);
|
if ('home' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value);
|
||||||
if ('category_base' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value);
|
if ('category_base' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value);
|
||||||
if (@ $value = unserialize($option->option_value) )
|
@ $value = unserialize($option->option_value);
|
||||||
$all_options->{$option->option_name} = $value;
|
if ($value === FALSE)
|
||||||
else $value = $option->option_value;
|
$value = $option->option_value;
|
||||||
$all_options->{$option->option_name} = $value;
|
$all_options->{$option->option_name} = $value;
|
||||||
}
|
}
|
||||||
return $all_options;
|
return $all_options;
|
||||||
|
|
Loading…
Reference in New Issue