From: shakertest at live dot no
Operating system: OS X & Ubuntu
PHP version: 5.3.0
PHP Bug Type: *General Issues
Bug description: converting to ErrorException cuts the "message"
Description:
------------
The exception message of an error that has been converted to an
ErrorException is getting cut so important information is missing,
Reproduce code:
---------------
function error_handler($code, $message, $file, $line)
{
throw new ErrorException($message, $code, 0, $file, $line);
}
set_error_handler('error_handler');
function hint(array $foo) {}
try
{
hint(123);
}
catch(Exception $e)
{
echo $e->getMessage();
}
Expected result:
----------------
Argument 1 passed to hint() must be an array, integer given, called in
test.php on line 14 and defined in test.php on line 10
Actual result:
--------------
Argument 1 passed to hint() must be an array, integer given, called in
test.php on line 14 and defined
--
Edit bug report at http://bugs.php.net/?id=48960&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=48960&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=48960&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=48960&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=48960&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=48960&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=48960&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=48960&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=48960&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=48960&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=48960&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=48960&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=48960&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=48960&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=48960&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48960&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48960&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=48960&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=48960&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=48960&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=48960&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=48960&r=mysqlcfg