]> granicus.if.org Git - php/commitdiff
Fixed debug_backtrace
authorDmitry Stogov <dmitry@zend.com>
Mon, 24 Feb 2014 13:29:45 +0000 (17:29 +0400)
committerDmitry Stogov <dmitry@zend.com>
Mon, 24 Feb 2014 13:29:45 +0000 (17:29 +0400)
Zend/zend_builtin_functions.c

index 4595e5211297bc3ff83b1b36fb71a44ad109ce90..865e0d5ae5fefb47dcdeeb27b24facfee923c6e5 100644 (file)
@@ -2235,7 +2235,9 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
                                                Z_OBJCE(ptr->object) : 
                                                ptr->function_state.function->common.scope,
                                        ptr->function_state.function)->val :
-                               ptr->function_state.function->common.function_name->val;
+                               (ptr->function_state.function->common.function_name ?
+                                ptr->function_state.function->common.function_name->val : 
+                                NULL);
 
                if (function_name) {
                        add_assoc_string_ex(&stack_frame, "function", sizeof("function")-1, (char*)function_name, 1);