diff options
author | andot <mabingyao@gmail.com> | 2014-07-10 14:08:34 +0800 |
---|---|---|
committer | andot <mabingyao@gmail.com> | 2014-07-10 14:08:34 +0800 |
commit | 15e6ddb931324bae6866e35898f41e066312a46b (patch) | |
tree | bd68fde3c35707f63e2860b419ccc4abb3c6a2f4 | |
parent | 28578382589dab25ea5fbd35b7754687706abc07 (diff) |
Fixed Object Constructor.
The old copy constructor of Php::Object forgot the call("__construct")
-rw-r--r-- | include/object.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/object.h b/include/object.h index 2e6628a..47935d7 100644 --- a/include/object.h +++ b/include/object.h @@ -42,8 +42,10 @@ public: Object(const Value &value) : Value() { // string types are instantiated - if (value.isString()) instantiate(value); - + if (value.isString()) { + instantiate(value); + call("__construct"); + } // otherwise copy the other object else operator=(value); } |