summaryrefslogtreecommitdiff
path: root/Zend/zend_inheritance.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2015-03-08 00:15:55 +0800
committerXinchen Hui <laruence@php.net>2015-03-08 00:21:02 +0800
commit95b4aa529336ede207dbd2d114521c60ec4f2ccb (patch)
tree9259774da4268a4dffc2efe040b72e0273045f66 /Zend/zend_inheritance.c
parentafad979c60e4b54b65a6fd7345d476076a7a9a03 (diff)
downloadphp-git-95b4aa529336ede207dbd2d114521c60ec4f2ccb.tar.gz
Fixed zend_hash_append result duplicated key
actually, maybe we should precalculate before calling zend_hash_appen when we are not sure whether the hash is caclculated(prop_info->name). but it looks a little ugly.. (also for zend_string_copy)
Diffstat (limited to 'Zend/zend_inheritance.c')
-rw-r--r--Zend/zend_inheritance.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c
index c48718c46c..e3ef17cc90 100644
--- a/Zend/zend_inheritance.c
+++ b/Zend/zend_inheritance.c
@@ -636,7 +636,6 @@ static void do_inherit_property(zend_property_info *parent_info, zend_string *ke
child_info = parent_info;
}
}
- zend_string_addref(key);
_zend_hash_append_ptr(&ce->properties_info, key, child_info);
}
}
@@ -704,7 +703,6 @@ static void do_inherit_class_constant(zend_string *name, zval *zv, zend_class_en
ce->ce_flags &= ~ZEND_ACC_CONSTANTS_UPDATED;
}
Z_ADDREF_P(zv);
- zend_string_addref(name);
_zend_hash_append(&ce->constants_table, name, zv);
}
}
@@ -857,7 +855,6 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
zend_function *new_func = do_inherit_method(key, func, ce);
if (new_func) {
- zend_string_addref(key);
_zend_hash_append_ptr(&ce->function_table, key, new_func);
}
} ZEND_HASH_FOREACH_END();