PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

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.