#49734 [NEW]: toString must return string value
| From: | jaaspden at uk dot ibm dot com | Date: | Thu, 01 Oct 2009 12:35:59 +0000 |
| Subject: | #49734 [NEW]: toString must return string value | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-143122@lists.php.net to get a copy of this message | ||
From: jaaspden at uk dot ibm dot com
Operating system: Windows and Linux
PHP version: 6SVN-2009-10-01 (snap)
PHP Bug Type: Reflection related
Bug description: toString must return string value
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 bug report at http://bugs.php.net/?id=49734&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49734&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49734&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49734&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=49734&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49734&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=49734&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=49734&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=49734&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=49734&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=49734&r=support
Expected behavior: http://bugs.php.net/fix.php?id=49734&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=49734&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=49734&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=49734&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49734&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49734&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=49734&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=49734&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=49734&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=49734&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=49734&r=mysqlcfg