![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Pear Pear programming, this is a very complex subject as with using pear with php can be a difficult task for some, so lets talk pear. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| dufuz Fri May 25 18:48:19 2007 UTC Modified files: /pear/Cache Container.php Log: Proper error checking http://cvs.php.net/viewvc.cgi/pear/C...&diff_format=u Index: pear/Cache/Container.php diff -u pear/Cache/Container.php:1.7 pear/Cache/Container.php:1.8 --- pear/Cache/Container.php:1.7 Wed Jan 26 09:47:28 2005 +++ pear/Cache/Container.php Fri May 25 18:48:19 2007 @@ -17,7 +17,7 @@ // | Christian Stocker <chregu@phant.ch> | // +----------------------------------------------------------------------+ // -// $Id: Container.php,v 1.7 2005/01/26 09:47:28 dufuz Exp $ +// $Id: Container.php,v 1.8 2007/05/25 18:48:19 dufuz Exp $ require_once 'Cache/Error.php'; @@ -39,7 +39,7 @@ * not recommended! * * @author Ulf Wendel <ulf.wendel@phpdoc.de> -* @version $Id: Container.php,v 1.7 2005/01/26 09:47:28 dufuz Exp $ +* @version $Id: Container.php,v 1.8 2007/05/25 18:48:19 dufuz Exp $ * @package Cache * @access public * @abstract @@ -151,10 +151,15 @@ $this->preload($id, $group); } return $this->cachedata; - } else { - list( , $data, ) = $this->fetch($id, $group); - return $data; } + + $ret = $this->fetch($id, $group); + if (PEAR::isError($ret)) { + return $ret; + } + + list( , $data, ) = $ret; + return $data; } // end func load /** @@ -172,10 +177,15 @@ $this->preload($id, $group); } return $this->userdata; - } else { - list( , , $userdata) = $this->fetch($id, $group); - return $userdata; } + + $ret = $this->fetch($id, $group); + if (PEAR::isError($ret)) { + return $ret; + } + + list( , , $userdata) = $ret; + return $userdata; } // end func getUserdata /** @@ -202,7 +212,12 @@ return false; } // I'm lazy... - list($this->expires, , ) = $this->fetch($id, $group); + $ret = $this->fetch($id, $group); + if (PEAR::isError($ret)) { + return $ret; + } + + list($this->expires, , ) = $ret; } // endless @@ -342,7 +357,11 @@ $this->id = $id; $this->group = $group; - list($this->expires, $this->cachedata, $this->userdata) = $this->fetch($id, $group); + $ret = $this->fetch($id, $group); + if (PEAR::isError($ret)) { + return $ret; + } + list($this->expires, $this->cachedata, $this->userdata) = $ret; if ($this->expires === null) { // Uuups, unknown ID | |||
| Featured Websites | ||||
|
![]() |
| Tags: cache, containerphp, cvs, pear |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| cvs: pear-core / package-PEAR.xml package2.xml /PEAR/PackageFile/Generator v2.php | Greg Beaver | Pear | 0 | 05-20-2007 7:42 PM |
| cvs: pear-core / package-PEAR.xml package2.xml /PEAR Installer.php /PEAR/PackageFile v1.php /PEAR/PackageFile/v2 Validator.php | Greg Beaver | Pear | 0 | 05-20-2007 7:42 PM |
| cvs: pear-core / package-PEAR.xml package2.xml /PEAR Downloader.php /PEAR/Downloader Package.php | Greg Beaver | Pear | 0 | 05-20-2007 7:42 PM |
| cvs: pear /PHP_CodeSniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting FileCommentSniff.php | Greg Sherwood | Pear | 0 | 05-20-2007 7:41 PM |
| google cache | d6rth7ader | Google questions | 2 | 07-31-2006 12:43 PM |
| Featured Websites | ||||
|