summaryrefslogtreecommitdiff
path: root/ext/spl
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2013-03-29 01:32:44 +0100
committerOndřej Surý <ondrej@sury.org>2013-03-29 01:32:44 +0100
commitcf099ba2ee4e438bae16c3670a14ce0c4390529a (patch)
tree062683b6a7226ded35262e94c933b9bd81199314 /ext/spl
parentf21eff8954d5956842795ea5653a9a5b8d62caa3 (diff)
downloadphp-cf099ba2ee4e438bae16c3670a14ce0c4390529a.tar.gz
Imported Upstream version 5.5.0~beta2upstream/5.5.0_beta2
Diffstat (limited to 'ext/spl')
-rw-r--r--ext/spl/spl_dllist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c
index 83610863e..aa462dfd7 100644
--- a/ext/spl/spl_dllist.c
+++ b/ext/spl/spl_dllist.c
@@ -1246,7 +1246,6 @@ SPL_METHOD(SplDoublyLinkedList, add)
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz", &zindex, &value) == FAILURE) {
return;
}
- SEPARATE_ARG_IF_REF(value);
intern = (spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
index = spl_offset_convert_to_long(zindex TSRMLS_CC);
@@ -1256,6 +1255,7 @@ SPL_METHOD(SplDoublyLinkedList, add)
return;
}
+ Z_ADDREF_P(value);
if (index == intern->llist->count) {
/* If index is the last entry+1 then we do a push because we're not inserting before any entry */
spl_ptr_llist_push(intern->llist, value TSRMLS_CC);