Ensure the Horde_Vcs_Log object is initialized before checking revision validity.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 13 Oct 2010 23:04:42 +0000 (19:04 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 13 Oct 2010 23:13:39 +0000 (19:13 -0400)
framework/Vcs/lib/Horde/Vcs.php
framework/Vcs/lib/Horde/Vcs/Cvs.php

index bc6c6fc..5acf612 100644 (file)
@@ -543,7 +543,8 @@ class Horde_Vcs
     }
 
     /**
-     *
+     * @param Horde_Vcs_File $fl  The file obejct
+     * @param string $rev         The revision identifier
      */
     public function getLogObject($fl, $rev)
     {
@@ -1176,6 +1177,7 @@ abstract class Horde_Vcs_Log
      */
     public function queryRevision()
     {
+        $this->_ensureInitialized();
         return $this->_rev;
     }
 
index aacebe4..93cec5e 100644 (file)
@@ -638,7 +638,7 @@ class Horde_Vcs_Log_Cvs extends Horde_Vcs_Log
                      * push valid revisions into the branches array */
                     $brs = preg_split('/;\s*/', $br[1]);
                     foreach ($brs as $brpoint) {
-                        if ($rep->isValidRevision($brpoint)) {
+                        if ($this->_rep->isValidRevision($brpoint)) {
                             $this->_branches[] = $brpoint;
                         }
                     }