Cache_Lite patch
| From: | Lorenzo Alberton | Date: | Tue, 14 Jan 2003 09:03:19 +0000 |
| Subject: | Cache_Lite patch | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-12395@lists.php.net to get a copy of this message | ||
14/01/2003 10.03.19
Hi,
I attached a diff to suppress two NOTICEs if cache is not existent yet.
This originated with the introduction of MemoryCache and applies to
current CVS.
Best regards,
Lorenzo
--- Lite.php 2003-01-14 09:19:16.000000000 +0100 +++ newLite.php 2003-01-14 09:57:56.000000000 +0100 @@ -235,10 +235,10 @@ $data = $this->_read(); } } - if (($data) and ($this->_memoryCaching)) { + if (isset($data) && $data && ($this->_memoryCaching)) { $this->_memoryCacheAdd($this->_file, $data); } - return $data; + return (isset($data) ? $data : false); } return false; }
--- Lite.php 2003-01-14 09:19:16.000000000 +0100 +++ newLite.php 2003-01-14 09:57:56.000000000 +0100 @@ -235,10 +235,10 @@ $data = $this->_read(); } } - if (($data) and ($this->_memoryCaching)) { + if (isset($data) && $data && ($this->_memoryCaching)) { $this->_memoryCacheAdd($this->_file, $data); } - return $data; + return (isset($data) ? $data : false); } return false; }