Re: Re: cvs: php-src /pear/PEAR Common.php
| From: | Greg Beaver | Date: | Sat, 01 May 2004 02:43:00 +0000 |
| Subject: | Re: Re: cvs: php-src /pear/PEAR Common.php | ||
| References: | 1 2 | Groups: | php.pear.cvs php.pear.core |
| Request: | Send a blank email to pear-cvs+get-19055@lists.php.net to get a copy of this message | ||
Jon Parise wrote:
On Fri, Apr 30, 2004 at 02:05:45AM -0000, Greg Beaver wrote:but the test is of $this->_packageName, not $pn, the $pn = '' is to remove a warning if buildProvidesArray() is called with no call to validatePackageFile(). The notice was because $_packageName was not set. Greg@@ -1235,7 +1235,10 @@Because you're initializing $pn to an empty string here, a !empty() test might be more appropriate.function buildProvidesArray($srcinfo) { $file = basename($srcinfo['source_file']); - $pn = $this->_packageName; + $pn = ''; + if (isset($this->_packageName)) { + $pn = $this->_packageName; + } $pnl = strlen($pn); foreach ($srcinfo['declared_classes'] as $class) { $key = "class;$class";