Re: Cache_Lite patch

From: Date: Tue, 14 Jan 2003 15:15:07 +0000
Subject: Re: Cache_Lite patch
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-12411@lists.php.net to get a copy of this message
On Tue, 14 Jan 2003 10:04:43 -0500 Jon Parise <jon@php.net> wrote: > On Tue, Jan 14, 2003 at 10:03:19AM +0100, Lorenzo Alberton wrote: > > > 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. > > [snip] > > > - if (($data) and ($this->_memoryCaching)) { > > + if (isset($data) && $data && ($this->_memoryCaching)) { > > if (!empty($data) && $this->_memoryCaching) { empty($nonsetvariable); raises a waring or a notice. A easier way is to set $data to '' before and keep !empty() test: $data=''; if ($doNotTestCacheValidity) { ... hth pierre

« previous php.pear.dev (#12411) next »