]> granicus.if.org Git - php/commitdiff
fix 3 bugs
authorGreg Beaver <cellog@php.net>
Sat, 6 Dec 2003 23:07:52 +0000 (23:07 +0000)
committerGreg Beaver <cellog@php.net>
Sat, 6 Dec 2003 23:07:52 +0000 (23:07 +0000)
- optional dependencies not supported
- PHP 5 references (#362)
- incorrect index determination

pear/PEAR/DependencyDB.php

index fadc23f5ed16b59d409e5db8922c6154c42f934b..99c9611886c8f8581003380ef189cc787d9c1512 100644 (file)
@@ -152,11 +152,12 @@ class PEAR_DependencyDB extends PEAR
     function &_getDepDB()
     {
         if (!$fp = fopen($this->depdb_file, 'r')) {
-            return $this->raiseError("Could not open dependencies file `".$this->depdb_file."'");
+            $err = $this->raiseError("Could not open dependencies file `".$this->depdb_file."'");
+            return $err;
         }
-        $data = fread($fp, filesize($this->depdb_file));
+        $data = unserialize(fread($fp, filesize($this->depdb_file)));
         fclose($fp);
-        return unserialize($data);
+        return $data;
     }
 
     // }}}