ID: 30112
Updated by: [EMAIL PROTECTED]
Reported By: jw at jwscripts dot com
-Status: Open
+Status: Verified
Bug Type: Reproducible crash
-Operating System: Windows XP
+Operating System: *
PHP Version: 5.0.2
New Comment:
#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
Previous Comments:
------------------------------------------------------------------------
[2004-09-25 13:33:35] jw at jwscripts dot com
Bug persists in version 5.0.2, the notice and fatal error are not
displayed (crash is more severe).
------------------------------------------------------------------------
[2004-09-16 13:39:45] 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30112&edit=1