diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-12-16 12:47:11 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-12-16 12:47:11 +0100 |
commit | ff9a22782a7d28b11af0ff2d3948a196ab12d003 (patch) | |
tree | 3fcb8020cb0dce094abefbbecb83055fc31ed1fd /zend/classimpl.cpp | |
parent | da4de6cb1097471b2659c102d55a646cbc9e0f41 (diff) |
fix issue #151, chaining method calls was not working as it should because the per-object refcount was not updated correctly, which caused an object to be destructed even when it already was assigned to a different variable
Diffstat (limited to 'zend/classimpl.cpp')
-rw-r--r-- | zend/classimpl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zend/classimpl.cpp b/zend/classimpl.cpp index 9c28a0a..e42605e 100644 --- a/zend/classimpl.cpp +++ b/zend/classimpl.cpp @@ -534,7 +534,7 @@ zend_object_value ClassImpl::cloneObject(zval *val TSRMLS_DC) result.handlers = impl->objectHandlers(); // store the object - ObjectImpl *new_object = new ObjectImpl(entry, cpp TSRMLS_CC); + ObjectImpl *new_object = new ObjectImpl(entry, cpp, 1 TSRMLS_CC); // store the object in the object cache result.handle = new_object->handle(); @@ -1195,7 +1195,7 @@ zend_object_value ClassImpl::createObject(zend_class_entry *entry TSRMLS_DC) result.handlers = impl->objectHandlers(); // create the object in the zend engine - ObjectImpl *object = new ObjectImpl(entry, cpp TSRMLS_CC); + ObjectImpl *object = new ObjectImpl(entry, cpp, 1 TSRMLS_CC); // store the object in the object cache result.handle = object->handle(); |