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 /zend/value.cpp | |
parent | 8308b984cc61cb2464b9192961abaae4fe750591 (diff) |
Fix exception catching and properly handle casting functions returning something other than a Php::Value
Diffstat (limited to 'zend/value.cpp')
-rw-r--r-- | zend/value.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/zend/value.cpp b/zend/value.cpp index 4aaec4c..d87e576 100644 --- a/zend/value.cpp +++ b/zend/value.cpp @@ -846,7 +846,7 @@ static Value do_exec(const zval *object, zval *method, int argc, zval *argv) TSRMLS_FETCH(); // the current exception - // zend_object *oldException = EG(exception); + zend_object *oldException = EG(exception); // call the function // we're casting the const away here, object is only const so we can call this method @@ -863,8 +863,7 @@ static Value do_exec(const zval *object, zval *method, int argc, zval *argv) { // was an exception thrown inside the function? In that case we throw a C++ new exception // to give the C++ code the chance to catch it - // @todo: make OrigException except a zend_object instance - // if (oldException != EG(exception) && EG(exception)) throw OrigException(EG(exception) TSRMLS_CC); + if (oldException != EG(exception) && EG(exception)) throw OrigException(EG(exception) TSRMLS_CC); // leap out if nothing was returned if (Z_ISUNDEF(retval)) return nullptr; |