$ob might not exist at all here
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 10 Oct 2010 23:21:22 +0000 (19:21 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 10 Oct 2010 23:21:22 +0000 (19:21 -0400)
framework/Vcs/lib/Horde/Vcs.php

index ed93d2b..bc6c6fc 100644 (file)
@@ -528,7 +528,10 @@ class Horde_Vcs
             }
         }
 
-        if (!$ob) { $ob = new $class($filename, $opts); }
+        if (empty($ob) || !$ob) {
+            $ob = new $class($filename, $opts);
+
+        }
         $ob->setRepository($this);
         $ob->applySort(self::SORT_AGE);
 
@@ -555,7 +558,10 @@ class Horde_Vcs
             }
         }
 
-        if (!$ob) { $ob = new $class($rev); }
+        if (empty($ob) || !$ob) {
+            $ob = new $class($rev);
+
+        }
         $ob->setRepository($this);
         $ob->setFile($fl);