cvs: php4 /pear/PEAR Remote.php
| From: | Christian Dickmann | Date: | Sun, 24 Nov 2002 10:13:57 +0000 |
| Subject: | cvs: php4 /pear/PEAR Remote.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-7562@lists.php.net to get a copy of this message | ||
dickmann Sun Nov 24 05:13:57 2002 EDT
Modified files:
/php4/pear/PEAR Remote.php
Log:
add some checks to increase cache integrity
Index: php4/pear/PEAR/Remote.php
diff -u php4/pear/PEAR/Remote.php:1.34 php4/pear/PEAR/Remote.php:1.35
--- php4/pear/PEAR/Remote.php:1.34 Sun Nov 10 20:23:24 2002
+++ php4/pear/PEAR/Remote.php Sun Nov 24 05:13:57 2002
@@ -16,7 +16,7 @@
// | Author: Stig Bakken <ssb@fast.no> |
// +----------------------------------------------------------------------+
//
-// $Id: Remote.php,v 1.34 2002/11/11 01:23:24 dickmann Exp $
+// $Id: Remote.php,v 1.35 2002/11/24 10:13:57 dickmann Exp $
require_once 'PEAR.php';
require_once 'PEAR/Config.php';
@@ -108,13 +108,15 @@
$this->cache = $this->getCache($args);
$cachettl = $this->config->get('cache_ttl');
// If cache is newer than $cachettl seconds, we use the cache!
- if ($this->cache !== null && $this->cache['age'] < $cachettl) {
+ if ($this->cache !== null && $this->cache['age'] < $cachettl
&& is_array($this->cache['content'])) {
return $this->cache['content'];
};
if (extension_loaded("xmlrpc")) {
$result = call_user_func_array(array(&$this, 'call_epi'), $args);
- $this->saveCache($_args, $result);
+ if (!PEAR::isError($result)) {
+ $this->saveCache($_args, $result);
+ };
return $result;
}
if (!@include_once("XML/RPC.php")) {