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

Bug #4952 PEAR_Exception::toHTML() spits notices
Submitted: 2005-07-30 17:42 UTC
From: jausions Assigned: cellog
Status: Closed Package: PEAR
PHP Version: 5.1.0 OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2005-07-30 17:42 UTC] jausions
Description: ------------ When an exception is thrown through "internal function" such as __call(), the 'line' and 'file' indexes are not set, rersulting in notices Test script: --------------- <?php require_once 'PEAR/Exception.php'; class MyException extends PEAR_Exception { } class MyOtherClass { function Hello() { throw new MyException('Blah!'); } } class MyClass { function __call($name, $params) { $o = new MyOtherClass(); $o->$name(); } } $myObj = new MyClass(); $myObj->Hello(); ?> Expected result: ---------------- No notices Actual result: -------------- With CVS version of Exception.php Notice: Undefined index: file in C:\OpenSA\Apache\php\PEAR\PEAR\Exception.php on line 345 Notice: Undefined index: line in C:\OpenSA\Apache\php\PEAR\PEAR\Exception.php on line 345

Comments

 [2005-08-07 15:31 UTC] cellog
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.