RE: [ZEND-ENGINE-CVS] cvs: Zend(PHP_4_4) / zend_compile.c
| From: | Dmitry Stogov | Date: | Mon, 16 Oct 2006 06:04:29 +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-5325@lists.php.net to get a copy of this message | ||
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) {
echo $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 UTC
>
> Modified files: (Branch: PHP_4_4)
> /Zend zend_compile.c
> Log:
> Fixed bug #39129 avoid creation of a dummy constructor.
>
>
> http://cvs.php.net/viewvc.cgi/Zend/zend_compile.c?r1=1.240.2.1
0.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