cvs: ZendEngine2 / zend_compile.c
| From: | Zeev Suraski | Date: | Fri, 29 Aug 2003 08:51:44 +0000 |
| Subject: | cvs: ZendEngine2 / zend_compile.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-1736@lists.php.net to get a copy of this message | ||
zeev Fri Aug 29 04:51:44 2003 EDT
Modified files:
/ZendEngine2 zend_compile.c
Log:
Fix a problem in implicit public properties and inheritance
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.468 ZendEngine2/zend_compile.c:1.469
--- ZendEngine2/zend_compile.c:1.468 Thu Aug 28 12:41:19 2003
+++ ZendEngine2/zend_compile.c Fri Aug 29 04:51:43 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c,v 1.468 2003/08/28 16:41:19 sas Exp $ */
+/* $Id: zend_compile.c,v 1.469 2003/08/29 08:51:43 zeev Exp $ */
#include "zend_language_parser.h"
#include "zend.h"
@@ -1756,9 +1756,10 @@
/* Explicitly copy the value from the parent */
zval **pvalue;
- if (zend_hash_quick_find(&parent_ce->default_properties, hash_key->arKey,
hash_key->nKeyLength, hash_key->h, (void **) &pvalue)==SUCCESS) {
- zend_hash_quick_update(&ce->default_properties, hash_key->arKey,
hash_key->nKeyLength, hash_key->h, pvalue, sizeof(zval *), NULL);
+ if (zend_hash_quick_find(&parent_ce->default_properties, parent_info->name,
parent_info->name_length+1, parent_info->h, (void **) &pvalue)==SUCCESS) {
+ zend_hash_quick_update(&ce->default_properties, parent_info->name,
parent_info->name_length+1, parent_info->h, pvalue, sizeof(zval *), NULL);
(*pvalue)->refcount++;
+ zend_hash_del(&ce->default_properties, child_info->name,
child_info->name_length+1);
}
return 1; /* Inherit from the parent */
}