]> granicus.if.org Git - php/commitdiff
Fixed bug #23093 (highlight_string() crashed with __FUNCTION__)
authorfoobar <sniper@php.net>
Mon, 7 Apr 2003 22:51:28 +0000 (22:51 +0000)
committerfoobar <sniper@php.net>
Mon, 7 Apr 2003 22:51:28 +0000 (22:51 +0000)
Zend/zend_language_scanner.l

index 9d128c36a5d9c7b214f2c89de963afcb13035132..1aa2110de6705a7bf7fab494db6ac3b063c95239 100644 (file)
@@ -985,7 +985,11 @@ NAMESPACE_NAME ({LABEL}":")+{LABEL}
 }
 
 <ST_IN_SCRIPTING>"__FUNCTION__" {
-       char *func_name = CG(active_op_array)->function_name;
+       char *func_name = NULL;
+
+       if (CG(active_op_array)) {
+               func_name = CG(active_op_array)->function_name;
+       }
 
        if (!func_name) {
                func_name = "";