]> granicus.if.org Git - php/commitdiff
- Typo in cache file creation
authorTomas V.V.Cox <cox@php.net>
Mon, 4 Aug 2003 10:15:34 +0000 (10:15 +0000)
committerTomas V.V.Cox <cox@php.net>
Mon, 4 Aug 2003 10:15:34 +0000 (10:15 +0000)
- Do not create the cache dir in getCache()

pear/PEAR/Remote.php

index 9949ea142321f6ceaf583cc6f6fe1b1877007af3..12f9f63c863776a0bab36f30ff05c6de3e0abe27 100644 (file)
@@ -55,9 +55,6 @@ class PEAR_Remote extends PEAR
     {
         $id       = md5(serialize($args));
         $cachedir = $this->config->get('cache_dir');
-        if (!file_exists($cachedir)) {
-            System::mkdir(array('-p', $cachedir));
-        }
         $filename = $cachedir . DIRECTORY_SEPARATOR . 'xmlrpc_cache_' . $id;
         if (!file_exists($filename)) {
             return null;
@@ -91,7 +88,7 @@ class PEAR_Remote extends PEAR
         $filename = $cachedir.'/xmlrpc_cache_'.$id;
 
         $fp = @fopen($filename, "wb");
-        if (!$fp) {
+        if ($fp) {
             fwrite($fp, serialize($data));
             fclose($fp);
         };