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    
Subscription  


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 23 + 20 = ?

 
 [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

Comments

 [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 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.