diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-13 23:54:54 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-13 23:54:54 +0100 |
commit | 681d1e6aa735568a492140d2307a89063e7aadb9 (patch) | |
tree | 98fa482ee64203b1ef75fb0e7c687d57f1abe20f /src/classbase.cpp | |
parent | 684f81e8bcbadc3d522e6557161275deaad4fd3b (diff) |
__clone() method is now called directly after a clone operation (and when no custom __clone is registered)
Diffstat (limited to 'src/classbase.cpp')
-rw-r--r-- | src/classbase.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/classbase.cpp b/src/classbase.cpp index ec316cd..ccfb9da 100644 --- a/src/classbase.cpp +++ b/src/classbase.cpp @@ -555,6 +555,9 @@ zend_object_value ClassBase::cloneObject(zval *val TSRMLS_DC) // had registered that as a visible method) zend_objects_clone_members(&new_object->php, result, &old_object->php, Z_OBJ_HANDLE_P(val)); + // was a custom clone method installed? If not we call the magic c++ __clone method + if (!entry->clone) meta->callClone(cpp); + // done return result; } |