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

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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!