|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-09-16 13:39 UTC] jw at jwscripts dot com
Description:
------------
When the __toString() method is called from a returned object to return an undefined property, Apache 2.0.48 crashes.
Reproduce code:
---------------
<?
class Foo {
public function doSomething() {
return new Foo;
}
public function __toString () {
return $this->undefined;
}
}
$foo = new Foo;
print $foo->doSomething();
?>
Expected result:
----------------
Notice: Undefined property: Foo::$undefined
Fatal error: Method Foo::__toString() must return a string value
Actual result:
--------------
Apache Crash:
=============
szAppName : Apache.exe szAppVer : 2.0.48.0
szModName : php5ts.dll
szModVer : 5.0.1.1 offset : 0004dd7f
+ the above messages
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 20:00:02 2025 UTC |
#0 0x08136dc9 in zend_get_class_entry (zobject=0x81f735c) at /home/johannes/src/php/php-5.0.2/Zend/zend_API.c:204 #1 0x0814d413 in zend_std_cast_object_tostring (readobj=0x81f735c, writeobj=0xbfffca40, type=3, should_free=0) at /home/johannes/src/php/php-5.0.2/Zend/zend_object_handlers.c:938 #2 0x0815bd96 in zend_echo_handler (execute_data=0xbfffcbb0, opline=0x81f57a0, op_array=0x81f124c) at /home/johannes/src/php/php-5.0.2/Zend/zend_execute.c:1984 #3 0x0815be3c in zend_print_handler (execute_data=0xbfffcbb0, opline=0x81f57a0, op_array=0x81f124c) at /home/johannes/src/php/php-5.0.2/Zend/zend_execute.c:2002 #4 0x0815ab28 in execute (op_array=0x81f124c) at /home/johannes/src/php/php-5.0.2/Zend/zend_execute.c:1400 #5 0x081365bf in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/johannes/src/php/php-5.0.2/Zend/zend.c:1060 #6 0x080f0edc in php_execute_script (primary_file=0xbfffeff0) at /home/johannes/src/php/php-5.0.2/main/main.c:1629 #7 0x0816775a in main (argc=1, argv=0xbffff094) at /home/johannes/src/php/php-5.0.2/sapi/cli/php_cli.c:943