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

Bug #10490 Bad error handling with some XML errors
Submitted: 2007-03-25 10:17 UTC
From: timj Assigned: timj
Status: Closed Package: PEAR_PackageFileManager (version 1.6.0)
PHP Version: 5.1.6 OS:
Roadmaps: 1.6.1    

 [2007-03-25 10:17 UTC] timj (Tim Jackson)
Description: ------------ When using PEAR_PackageFileManager2::importOptions(), certain kinds of XML errors in the imported package file cause PFM2 to exit ungracefully. Test script: --------------- package.xml snippet: ... <dependencies> [some dependencies] </dependencies> [some more dependencies] </dependencies> ... Expected result: ---------------- XML Error: 'Mismatched tag' on line '74' Actual result: -------------- Fatal error: Call to undefined method PEAR_Error::validate() in /path/to/PEAR/PackageFileManager2.php on line 1750


 [2007-03-25 10:19 UTC] timj (Tim Jackson)
This is because the PEAR::isError() check on $pf is done too late. It should be done just before line 1750.
 [2007-03-25 10:21 UTC] timj (Tim Jackson)
Attached patch fixes the bug.
 [2007-04-04 03:24 UTC] cellog (Greg Beaver)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the 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.