summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-07-27 16:46:55 +0200
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-07-27 16:46:55 +0200
commite3205d872acd87d1d3a81e489a1416586ced1236 (patch)
treeb788cd79f87c9c05ac0dd666d2ae77fa3c5c2fab
parente46c2ec8eb8a8dc6e3750b8e3fdb764956b18e42 (diff)
parent15e6ddb931324bae6866e35898f41e066312a46b (diff)
Merge branch 'FixedObjectConstructor' of https://github.com/andot/PHP-CPP
-rw-r--r--include/object.h6
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);
}