Bug #80264 [Csd->Nab]: current_execute_data is NULL in zend_error_cb

From: Date: Tue, 20 Oct 2020 16:10:14 +0000
Subject: Bug #80264 [Csd->Nab]: current_execute_data is NULL in zend_error_cb
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229811@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80264&edit=1 ID: 80264 Updated by: cmb@php.net Reported by: f dot sowade at r9e dot de Summary: current_execute_data is NULL in zend_error_cb -Status: Closed +Status: Not a bug Type: Bug Package: *General Issues Operating System: Linux and Mac OS PHP Version: 8.0.0RC2 Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2020-10-20 16:02:36] f dot sowade at r9e dot de Sorry - EG(current_execute_data) was NULL in PHP 7.4 as well. Had a problem in my reproduction code. ------------------------------------------------------------------------ [2020-10-20 15:48:49] f dot sowade at r9e dot de Description: ------------ When triggering an error using the attached test script, EG(current_execute_data) is NULL in zend_error_va() just before calling zend_error_cb and the error observers. This prevents error handlers from calling zend_fetch_debug_backtrace() which needs EG(current_execute_data) to produce the backtrace. Calling zend_fetch_debug_backtrace() from inside an error callback did work in PHP 7.4 and returned the backtrace where the error was triggered. Test script: --------------- <?php ini_set('display_errors', false); non_existant_function(); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80264&edit=1

« previous php.bugs (#229811) next »