From: Marcus Boerger Date: Mon, 7 Mar 2005 19:34:03 +0000 (+0000) Subject: - MFH X-Git-Tag: php-5.0.4RC1~59 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=916806055c45d69aee85f778e409f8ade09d16ea;p=php - MFH --- diff --git a/Zend/tests/bug32226.phpt b/Zend/tests/bug32226.phpt new file mode 100755 index 0000000000..b2bd754c28 --- /dev/null +++ b/Zend/tests/bug32226.phpt @@ -0,0 +1,36 @@ +--TEST-- +Bug # 32226 (SEGV with exception handler on non existing instance) +--FILE-- + +===DONE=== +--EXPECT-- +Caught +===DONE=== diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 4428828ac1..45df85006f 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1737,7 +1737,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last TSRML if (function_name) { add_assoc_string_ex(stack_frame, "function", sizeof("function"), function_name, 1); - if (ptr->object) { + if (ptr->object && Z_TYPE_P(ptr->object) == IS_OBJECT) { class_name = Z_OBJCE(*ptr->object)->name; call_type = "->"; } else if (ptr->function_state.function->common.scope) {