|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80264 current_execute_data is NULL in zend_error_cb
Submitted: 2020-10-20 15:48 UTC Modified: 2020-10-20 16:10 UTC
From: f dot sowade at r9e dot de Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 8.0.0RC2 OS: Linux and Mac OS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
46 - 29 = ?
Subscribe to this entry?

 [2020-10-20 15:48 UTC] f dot sowade at r9e dot de
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:
ini_set('display_errors', false);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-20 16:02 UTC] f dot sowade at r9e dot de
-Status: Open +Status: Closed
 [2020-10-20 16:02 UTC] 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 16:10 UTC]
-Status: Closed +Status: Not a bug
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Aug 11 08:05:57 2022 UTC