From 15e6ddb931324bae6866e35898f41e066312a46b Mon Sep 17 00:00:00 2001 From: andot Date: Thu, 10 Jul 2014 14:08:34 +0800 Subject: Fixed Object Constructor. The old copy constructor of Php::Object forgot the call("__construct") --- include/object.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/object.h') 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); } -- cgit v1.2.3