diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-11-20 17:12:54 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-11-20 17:12:54 +0100 |
commit | 069beaa49325728e0eff0ba13fa480604ce43a84 (patch) | |
tree | 066b5f2fac5418f0430320c9c67000903482c431 /include | |
parent | 3d51521cc809f6ba23045bca03c261c5adca544e (diff) |
Fixed issue #137: Php::Object("MyClass") crashed when no __construct() function was defined in it
Diffstat (limited to 'include')
-rw-r--r-- | include/object.h | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/include/object.h b/include/object.h index 6350259..124c0b3 100644 --- a/include/object.h +++ b/include/object.h @@ -39,24 +39,7 @@ public: * or when it is a string holding a classname * @param that An other object */ - Object(const Value &value) : Value() - { - // when a string is passed in, we are going to make a new instance of the - // passed in string - if (value.isString()) - { - // instantiate the object - instantiate(value); - - // and call the __construct method - call("__construct"); - } - else - { - // this simply copies the other object - operator=(value); - } - } + Object(const Value &value); /** * Constructor to create a new instance of a builtin class @@ -183,9 +166,9 @@ private: /** * Helper method to instantiate an object * @param name Class name + * @return zend_class_entry */ - void instantiate(const char *name); - + struct _zend_class_entry *instantiate(const char *name); }; /** |