|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: f dot sowade at r9e dot de
New email:
PHP Version: OS:


 [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: Wed Aug 17 04:05:45 2022 UTC