Open YuanchengJiang opened 1 month ago
fbc->op_array.filename
is NULL here. Maybe just
ext/zend_test/observer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ext/zend_test/observer.c b/ext/zend_test/observer.c
index 37bbdbbd3c..c7b6a81c4e 100644
--- a/ext/zend_test/observer.c
+++ b/ext/zend_test/observer.c
@@ -172,7 +172,7 @@ static void observer_show_init_backtrace(zend_execute_data *execute_data)
php_printf("%*s%s()\n", indent, "", ZSTR_VAL(fbc->common.function_name));
}
} else {
- php_printf("%*s{main} %s\n", indent, "", ZSTR_VAL(fbc->op_array.filename));
+ php_printf("%*s{main} %s\n", indent, "", fbc->op_array.filename ? ZSTR_VAL(fbc->op_array.filename) : "unknown");
}
} while ((ex = ex->prev_execute_data) != NULL);
php_printf("%*s-->\n", 2 * ZT_G(observer_nesting_depth), "");
This looks like a duplicate of https://github.com/php/php-src/pull/16299.
Edit: Wrong link. https://github.com/php/php-src/pull/16301/files And also, I'm wrong.
Description
The following code:
Resulted in this output:
To reproduce:
PHP Version
PHP 8.4.0-dev
Operating System
ubuntu 22.04