Fix returning unset but existent array key in pickKey

This commit is contained in:
Judebert 2008-04-10 03:41:17 +00:00
parent 3caaeef07d
commit d09bee19d9

View File

@ -1153,7 +1153,9 @@ function &serendipity_pickKey(&$array, $key, $default) {
// array_key_exists() copies array, so is much slower.
if (in_array($key, array_keys($array))) {
return $array[$key];
if (isset($array[$key])) {
return $array[$key];
}
}
foreach($array AS $child) {
if (is_array($child) && isset($child[$key]) && !empty($child[$key])) {