summaryrefslogtreecommitdiff
path: root/pear
diff options
context:
space:
mode:
authorChristian Dickmann <dickmann@php.net>2002-11-24 10:13:57 +0000
committerChristian Dickmann <dickmann@php.net>2002-11-24 10:13:57 +0000
commit0228cfcf4a528455bddc08e0ecea9549649d41ea (patch)
treeac80d9e143bf87984bc769faeb1a1e2742f3c6c4 /pear
parent7dd3e5e6831d659fe2c4fb73a25a0bad620e11de (diff)
downloadphp-git-0228cfcf4a528455bddc08e0ecea9549649d41ea.tar.gz
add some checks to increase cache integrity
Diffstat (limited to 'pear')
-rw-r--r--pear/PEAR/Remote.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/pear/PEAR/Remote.php b/pear/PEAR/Remote.php
index 0d1a11556c..6925906c8b 100644
--- a/pear/PEAR/Remote.php
+++ b/pear/PEAR/Remote.php
@@ -108,13 +108,15 @@ class PEAR_Remote extends PEAR
$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")) {