PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Caching » Cache » Bug #6782

Error Handling In Container Problem

Details

Submitted2006-02-14 17:52 UTC
Fromseth at pricepages dot org
Assigneddufuz
StatusClosed
PackageCache
PHP VersionIrrelevant
OSMac
Roadmaps(Not assigned)

Comments

[2006-02-14 17:52 UTC] seth at pricepages dot org

Description:
------------
If an error is thrown in Container::fetch(), it is not
handled in Container::preload(). Because it is immediately
used in list(), a fatal error occurs.

I fixed this by changing (in Container::preload()):

list($this->expires, $this->cachedata, $this->userdata) =
$this->fetch($id, $group);

To:

if(PEAR::isError($ret = $this->fetch($id, $group))){
return $ret;
}

list($this->expires, $this->cachedata, $this->userdata) =
$ret;

[2007-06-18 21:12 UTC] seth at pricepages dot org

That sounds like the problem I was having. Sorry for not
replying sooner, I didn't get a email or anything that your
comment had been added.