Re: [ZEND-ENGINE-CVS] cvs: Zend(PHP_4_4) / zend_compile.c
| From: | Ilia Alshanetsky | Date: | Mon, 16 Oct 2006 15:14:41 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: Zend(PHP_4_4) / zend_compile.c | ||
| References: | 1 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-5328@lists.php.net to get a copy of this message | ||
Dmitry,
Tony had already pointed out a problem yesterday. I am looking at a number of possible solutions right now, if I can't come up with a proper fix I'll restore the previous behavior.
On 16-Oct-06, at 2:04 AM, Dmitry Stogov wrote:
Hi Ilia, Are you sure in your patch? You just disable constructor inheritance. The following script doesn't print "ok" after your patch. <?php class A { function A($x) {Ilia Alshanetskyecho $x;} } class B extends A { } $x = new B("ok"); ?> Please revert it. Dmitry.-----Original Message----- From: Ilia Alshanetsky [mailto:iliaa@php.net] Sent: Sunday, October 15, 2006 9:06 PM To: zend-engine-cvs@lists.php.net Subject: [ZEND-ENGINE-CVS] cvs: Zend(PHP_4_4) / zend_compile.c iliaa Sun Oct 15 17:06:14 2006 UTC0.2.7&r2=1.240.2.10.2.8&diff_format=u Index: Zend/zend_compile.c diff -u Zend/zend_compile.c:1.240.2.10.2.7 Zend/zend_compile.c:1.240.2.10.2.8 --- Zend/zend_compile.c:1.240.2.10.2.7 Thu Feb 23 18:07:16 2006 +++ Zend/zend_compile.c Sun Oct 15 17:06:14 2006 @@ -1164,7 +1164,7 @@ if (zend_hash_find(&ce->parent->function_table, ce->parent->name, ce->parent->name_length+1, (void **) &function)==SUCCESS) { /* inherit parent's constructor */ - zend_hash_update(&ce->function_table, ce->name, ce->name_length+1, function, sizeof(zend_function), NULL); + zend_hash_update(&ce->function_table, ce->parent->name, +ce->parent->name_length+1, function, sizeof(zend_function), NULL); function_add_ref(function); } } --Zend Engine CVS Mailing List (http://cvs.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --Zend Engine CVS Mailing List (http://cvs.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpModified files: (Branch: PHP_4_4) /Zend zend_compile.cLog: Fixed bug #39129 avoid creation of a dummy constructor. http://cvs.php.net/viewvc.cgi/Zend/zend_compile.c?r1=1.240.2.1