diff options
author | Martijn Otto <martijn.otto@copernica.com> | 2016-05-20 13:38:56 +0200 |
---|---|---|
committer | Martijn Otto <martijn.otto@copernica.com> | 2016-05-20 13:38:56 +0200 |
commit | 252870d4a85f942107e7b51f9bdf5fae4e88f728 (patch) | |
tree | 0b4d9108c0f75bcbe6a9a8a5ba51bb73eeb6a28a /include/class.h | |
parent | 8308b984cc61cb2464b9192961abaae4fe750591 (diff) |
Fix exception catching and properly handle casting functions returning something other than a Php::Value
Diffstat (limited to 'include/class.h')
-rw-r--r-- | include/class.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/class.h b/include/class.h index 371595e..26cc610 100644 --- a/include/class.h +++ b/include/class.h @@ -462,7 +462,7 @@ private: T *obj = (T *)base; // retrieve the casted value and convert it if necessary - auto result = obj->__toString(); + Value result{ obj->__toString() }; result.setType(Type::String); // return the converted result @@ -480,7 +480,7 @@ private: T *obj = (T *)base; // retrieve the casted value and convert it if necessary - auto result = obj->__toInteger(); + Value result{ obj->__toInteger() }; result.setType(Type::Numeric); // return the converted result @@ -498,7 +498,7 @@ private: T *obj = (T *)base; // retrieve the casted value and convert it if necessary - auto result = obj->__toFloat(); + Value result{ obj->__toFloat() }; result.setType(Type::Float); // return the converted result @@ -516,7 +516,7 @@ private: T *obj = (T *)base; // retrieve the casted value and convert it if necessary - auto result = obj->__toBool(); + Value result{ obj->__toBool() }; result.setType(Type::Bool); // return the converted result |