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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 00:01:28 2024 UTC