php.net |  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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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
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();



Patches

Pull Requests

History

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] cmb@php.net
-Status: Closed +Status: Not a bug
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon May 12 03:01:30 2025 UTC