From: andrea dot barani at tin dot it Operating system: Windows Vista (32bit) PHP version: 5.2.3 PHP Bug Type: Unknown/Other Function Bug description: Error strings are trimmed in custom error handlers for catchable fatal errors
Description: ------------ Error strings are trimmed out in custom error handlers for catchable fatal errors. This following code uses type hinting available in Php 5 to produce a recoverable error. As you can see the last part of the error string is missing. This code has been tested under different conditions and paths, the string is always trimmed after the word 'defined'. Reproduce code: --------------- <?php function handler($errno, $errstr) { echo $errstr; } set_error_handler('handler'); class Test1 { public function __construct(Test3 $variable) { } } class Test2 { } $test2 = new Test2; $test1 = new Test1($test2); ?> Expected result: ---------------- Argument 1 passed to Test1::__construct() must be an instance of Test3, instance of Test2 given, called in D:\Web\test.php on line 20 and defined in D:\Web\test.php on line 11 Actual result: -------------- Argument 1 passed to Test1::__construct() must be an instance of Test3, instance of Test2 given, called in D:\Web\test.php on line 20 and defined -- Edit bug report at http://bugs.php.net/?id=41930&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41930&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41930&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41930&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41930&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41930&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41930&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41930&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41930&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41930&r=support Expected behavior: http://bugs.php.net/fix.php?id=41930&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41930&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41930&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41930&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41930&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41930&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41930&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41930&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41930&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41930&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41930&r=mysqlcfg