]> granicus.if.org Git - php/commitdiff
MFH (add missing check)
authorMarcus Boerger <helly@php.net>
Tue, 12 Oct 2004 09:16:17 +0000 (09:16 +0000)
committerMarcus Boerger <helly@php.net>
Tue, 12 Oct 2004 09:16:17 +0000 (09:16 +0000)
Zend/zend_builtin_functions.c

index d18ac8f38f16d2987d30cbaea526d687c805a234..545998cf8c3d578ddabece235dc7a45285ba65ca 100644 (file)
@@ -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";