diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-06-11 10:45:01 +0200 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-06-11 10:45:01 +0200 |
commit | b4936cbc31c20c390d50333da5c83ff31795acf7 (patch) | |
tree | 8e25fef14825b2be5f493249ab401b0bbc05f70d /zend/object.cpp | |
parent | 9502a731c09593db0d3b7ad3a1d3ee90b8b44901 (diff) |
when an object was created using Php::Object("MyClass", new MyClass()), the object handlers were not installed, which caused the magic methods not to be functional (issue #94)
Diffstat (limited to 'zend/object.cpp')
-rw-r--r-- | zend/object.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/zend/object.cpp b/zend/object.cpp index 08553b5..940b143 100644 --- a/zend/object.cpp +++ b/zend/object.cpp @@ -22,7 +22,7 @@ Object::Object(const char *name, Base *base) // does the object already have a handle? if (base->implementation()) { - // the object is already instantiated, we can assign it the this object + // the object is already instantiated, we can assign it to this object operator=(Value(base)); } else @@ -42,6 +42,9 @@ Object::Object(const char *name, Base *base) // now we can store it operator=(Value(base)); + + // install the object handlers + Z_OBJVAL_P(_val).handlers = ClassImpl::objectHandlers(entry); } } |