|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-11-08 09:06 UTC] helly@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 04:00:01 2025 UTC |
Description: ------------ It's actually the same bug as before with __get() not returning any value. __toString() simply crashed when you throw an exception inside. There is an other problem with __toString(). If you call an other __toString() method from an other object to return it, the value is not considered as a string. The version I tested on is actually the one from yesterday. Reproduce code: --------------- class Foo { function __toString() { return "Hello World!"; } } class Bar { private $obj; function __construct() { $this->obj = new Foo(); } function __toString() { return $this->obj->__toString(); } } $o = new Bar(); echo $o;