zend_class_entry *ce_exception;
ZVAL_OBJ(&exception, ex);
- ce_exception = Z_OBJCE(exception);
+ ce_exception = ex->ce;
EG(exception) = NULL;
if (ce_exception == zend_ce_parse_error || ce_exception == zend_ce_compile_error) {
zend_string *message = zval_get_string(GET_PROPERTY(&exception, ZEND_STR_MESSAGE));
zend_string_release_ex(file, 0);
zend_string_release_ex(message, 0);
} else if (instanceof_function(ce_exception, zend_ce_throwable)) {
- zval tmp, rv;
+ zval tmp;
zend_string *str, *file = NULL;
zend_long line = 0;