Fix notice with pass by reference.
authorJan Schneider <jan@horde.org>
Mon, 14 Jun 2010 23:36:06 +0000 (01:36 +0200)
committerJan Schneider <jan@horde.org>
Mon, 14 Jun 2010 23:36:06 +0000 (01:36 +0200)
framework/Util/lib/Horde/Array.php

index 7984d45..8b99927 100644 (file)
@@ -95,8 +95,8 @@ class Horde_Array
         /* If no key to sort by is specified, use the first key of the
          * first element. */
         if (is_null($key)) {
-            reset($array);
-            $key = array_shift(array_keys(current($array)));
+            $keys = array_keys(reset($array));
+            $key = array_shift($keys);
         }
 
         /* Call the appropriate sort function. */