]> git.mjollnir.org Git - s9y.git/commitdiff
Fix returning unset but existent array key in pickKey
authorslothman <slothman>
Thu, 10 Apr 2008 03:41:17 +0000 (03:41 +0000)
committerslothman <slothman>
Thu, 10 Apr 2008 03:41:17 +0000 (03:41 +0000)
include/functions.inc.php

index 9efdf7fb2969c98795ae2901f35061eb0c663ea2..5d1a8fd68f92cc66ce5fc9df9b129caf921a12eb 100644 (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])) {