From 8ff88cc1e80500e8ae52639e9f2cd216d741ee0f Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Wed, 13 Oct 2010 19:04:42 -0400 Subject: [PATCH] Ensure the Horde_Vcs_Log object is initialized before checking revision validity. --- framework/Vcs/lib/Horde/Vcs.php | 4 +++- framework/Vcs/lib/Horde/Vcs/Cvs.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/Vcs/lib/Horde/Vcs.php b/framework/Vcs/lib/Horde/Vcs.php index bc6c6fcdc..5acf61285 100644 --- a/framework/Vcs/lib/Horde/Vcs.php +++ b/framework/Vcs/lib/Horde/Vcs.php @@ -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; } diff --git a/framework/Vcs/lib/Horde/Vcs/Cvs.php b/framework/Vcs/lib/Horde/Vcs/Cvs.php index aacebe40a..93cec5e4a 100644 --- a/framework/Vcs/lib/Horde/Vcs/Cvs.php +++ b/framework/Vcs/lib/Horde/Vcs/Cvs.php @@ -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; } } -- 2.11.0