From: Tomas V.V.Cox Date: Mon, 4 Aug 2003 10:15:34 +0000 (+0000) Subject: - Typo in cache file creation X-Git-Tag: RELEASE_1_2b5~55 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4d57ab6d991c7c136eb055a25c3f9070ca88d08f;p=php - Typo in cache file creation - Do not create the cache dir in getCache() --- diff --git a/pear/PEAR/Remote.php b/pear/PEAR/Remote.php index 9949ea1423..12f9f63c86 100644 --- a/pear/PEAR/Remote.php +++ b/pear/PEAR/Remote.php @@ -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); };