diff options
Diffstat (limited to 'zend/iteratorimpl.cpp')
-rw-r--r-- | zend/iteratorimpl.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/zend/iteratorimpl.cpp b/zend/iteratorimpl.cpp index 3bd2ed7..49526b1 100644 --- a/zend/iteratorimpl.cpp +++ b/zend/iteratorimpl.cpp @@ -81,10 +81,7 @@ void IteratorImpl::key(zend_object_iterator *iter, zval *key TSRMLS_DC) Value retval(self(iter)->key()); // detach the underlying zval - zval *val = retval.detach(); - - // increment number of references of the zval (we keep a copy too) - Z_ADDREF_P(val); + zval *val = retval.detach(true); // copy it to the key ZVAL_ZVAL(key, val, 1, 1); |