Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.15

Bug #9206 PEAR package info is not retrieved correctly for package with single release
Submitted: 2006-11-01 00:13 UTC
From: akalura at gmail dot com Assigned: cellog
Status: Closed Package: PEAR (version 1.4.11)
PHP Version: 5.1.6 OS: Windows XP
Roadmaps: (Not assigned)    
Subscription  


 [2006-11-01 00:13 UTC] akalura at gmail dot com (Arjun Kalura)
Description: ------------ Pear Version: 1.4.9 While issuing “pear remote-info [packagename]” command if the package only has one release associated with it (in r/packagename/allreleases.xml), the console returns following error “Notice: Undefined variable: latest in PEAR\REST\10.php on line 595 PACKAGE DETAILS: ================ Latest “ Fix/Solution Line #556 of 10.php under PEAR\REST folder (function packageInfo() ) should be modified Current Code if (!is_array($allreleases['r'])) { $allreleases['r'] = array($allreleases['r']); } Should be replaced by if (!is_array($allreleases['r']) || !isset($allreleases['r'][0])) { $allreleases['r'] = array($allreleases['r']); } Test script: --------------- Create a package with single release i.e. allreleases.xml should be somewhat like this <?xml version="1.0" encoding="UTF-8" ?> <a xmlns="http://pear.php.net/dtd/rest.allreleases" xsi:schemaLocation="http://pear.php.net/dtd/rest.allreleases http://pear.php.net/dtd/rest.allreleases.xsd"> <p>Package</p> <c>pear.mydomain.com</c> <r><v>0.0.1</v><s>alpha</s></r> </a> Expected result: ---------------- pear remote-info mydomain\Package will result in error.

Comments

 [2006-11-01 05:09 UTC] cellog (Greg Beaver)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.