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

From: Date: Tue, 20 Oct 2020 16:02:36 +0000
Subject: Bug #80264 [Opn->Csd]: current_execute_data is NULL in zend_error_cb
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229809@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 User updated by: f dot sowade at r9e dot de Reported by: f dot sowade at r9e dot de Summary: current_execute_data is NULL in zend_error_cb -Status: Open +Status: Closed Type: Bug Package: *General Issues Operating System: Linux and Mac OS PHP Version: 8.0.0RC2 Block user comment: N Private report: N New Comment: Sorry - EG(current_execute_data) was NULL in PHP 7.4 as well. Had a problem in my reproduction code. Previous Comments: ------------------------------------------------------------------------ [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 (#229809) next »