#37537 [NEW]: Throwing exceptions in __tostring is not supported
| From: | mfischer@php.net | Date: | Sun, 21 May 2006 05:27:57 +0000 |
| Subject: | #37537 [NEW]: Throwing exceptions in __tostring is not supported | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969373077@lists.php.net to get a copy of this message | ||
From: mfischer@php.net
Operating system: Any
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: Throwing exceptions in __tostring is not supported
Description:
------------
From zend_object_handlers.c:
zend_error(E_ERROR, "Method %v::__toString() must not throw an exception",
ce->name);
This is due the recent changes that from now on __toString will be called
everywhere an object is used in a string context.
Good page candidates are:
http://de.php.net/manual/en/language.exceptions.php
http://de.php.net/manual/en/language.oop5.magic.php
--
Edit bug report at http://bugs.php.net/?id=37537&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37537&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37537&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37537&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37537&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=37537&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37537&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37537&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37537&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37537&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37537&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=37537&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=37537&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37537&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37537&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37537&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37537&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37537&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37537&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37537&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37537&r=mysqlcfg