#49734 [Opn->Csd]: toString must return string value
ID: 49734
Updated by: felipe@php.net
Reported By: jaaspden at uk dot ibm dot com
-Status: Open
+Status: Closed
-Bug Type: Reflection related
+Bug Type: Scripting Engine problem
Operating System: Windows and Linux
PHP Version: 6SVN-2009-10-01 (snap)
-Assigned To:
+Assigned To: felipe
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2009-11-12 23:18:06] svn@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=290642
Log: - Fixed bug #49734 (toString must return string value)
------------------------------------------------------------------------
[2009-10-01 12:35:59] jaaspden at uk dot ibm dot com
Description:
------------
When using ReflectionException _toString requires a string value to be
returned. Earlier versions will accept integers and arrays
Reproduce code:
---------------
<?php
$e = new Exception("message");
$exc = new ReflectionException($e);
var_dump($exc->getCode());
?>
Expected result:
----------------
int(%d)
Actual result:
--------------
Catchable fatal error: Method Exception::__toString() must return a
string value in %s on line %d
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49734&edit=1
Thread (2 messages)