From: Marcus Boerger Date: Tue, 12 Oct 2004 09:16:17 +0000 (+0000) Subject: MFH (add missing check) X-Git-Tag: php-5.0.3RC1~149 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0bcb369eacc0668a05ce0bdc86d6133fc57baf17;p=php MFH (add missing check) --- diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index d18ac8f38f..545998cf8c 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1731,6 +1731,11 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last TSRML /* i know this is kinda ugly, but i'm trying to avoid extra cycles in the main execution loop */ zend_bool build_filename_arg = 1; + if (!ptr->opline) { + /* can happen when calling eval from a custom sapi */ + function_name = "unknown"; + build_filename_arg = 0; + } else switch (ptr->opline->op2.u.constant.value.lval) { case ZEND_EVAL: function_name = "eval";