Re: PEAR_REST 1.0 and 1.3 possible bug (minor)
| From: | Laurent Laville | Date: | Tue, 26 Jun 2007 16:25:52 +0000 |
| Subject: | Re: PEAR_REST 1.0 and 1.3 possible bug (minor) | ||
| References: | 1 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-4367@lists.php.net to get a copy of this message | ||
Finally I've opened a bug report (#11446)
Hi, While I try a solution to retrieve latest version of packages thru php script, I found a possible bug into PEAR/REST/10.php and PEAR/REST13.php Look inside function *getDepDownloadURL* function getDepDownloadURL($base, $xsdversion, $dependency, $deppackage,$prefstate = 'stable', $installed = false){$channel = $dependency['channel']; $package = $dependency['name']; $states = $this->betterStates($prefstate, true); if (!$states) { return PEAR::raiseError('"' . $prefstate . '" is not a valid state'); } $state = $version = null; if (isset($packageinfo['state'])) { $state = $packageinfo['state']; } if (isset($packageinfo['version'])) { $version = $packageinfo['version']; }//... } As there is no function parameter or local variable called *$packageinfo*, I think it's a simple copy/paste (from getDownloadURL function) without replace. I suppose here it should beif (isset($dependency['state'])) { $state = $dependency['state']; } if (isset($dependency['version'])) { $version = $dependency['version']; }rather thanif (isset($packageinfo['state'])) { $state = $packageinfo['state']; } if (isset($packageinfo['version'])) { $version = $packageinfo['version']; }A confirmation may be cool before open a new bug report. regards Laurent