Make sure $opts is an array before sorting it
authorChuck Hagenbuch <chuck@horde.org>
Wed, 24 Nov 2010 15:29:59 +0000 (10:29 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Wed, 24 Nov 2010 15:29:59 +0000 (10:29 -0500)
framework/Vcs/lib/Horde/Vcs.php

index 3ade2d5..f01c559 100644 (file)
@@ -587,6 +587,7 @@ class Horde_Vcs
     {
         $class = 'Horde_Vcs_Patchset_' . $this->_driver;
 
+        if (!is_array($opts)) { $opts = array(); }
         ksort($opts);
         $cacheId = implode('|', array($class, $this->sourceroot(), serialize($opts), $this->_cacheVersion));
 
@@ -638,5 +639,4 @@ class Horde_Vcs
     {
         return 'HEAD';
     }
-
 }