Bug #81431 [NEW]: header_register_calback no longer allows die() to stop executing outputting
From: raoul_vanmaaren at live dot nl
Operating system:
PHP version: 8.0.10
Package: Output Control
Bug Type: Bug
Bug description:header_register_calback no longer allows die() to stop executing outputting
Description:
------------
In PHP 8.0.0 - 8.0.10, a die statement within the
header_register_callback function will not prevent the trigger from
being outputted. In previous versions this was the case.
This is with the standard settings.
I am not sure if this is caused by the performance upgrades and if this
is intended or not. However, I cannot find any documentation either.
Test script:
---------------
<?php
ob_start(); // make sure ob_level is set to 1
function callback()
{
echo "In php 8.0.0 - 8.0.10, a die statement does prevent the
trigger from being outputted: ";
die();
}
header_register_callback("callback");
ob_end_clean();
echo "Trigger.";
echo "Execution died before this echo statement.";
Expected result:
----------------
In php 8.0.0 - 8.0.10, a die statement does prevent the trigger from
being outputted:
Actual result:
--------------
In php 8.0.0 - 8.0.10, a die statement does prevent the trigger from
being outputted: Trigger.
--
Edit bug report at https://bugs.php.net/bug.php?id=81431&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81431&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81431&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81431&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81431&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81431&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81431&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81431&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81431&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81431&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81431&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81431&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81431&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81431&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81431&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81431&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81431&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81431&r=mysqlcfg
Thread (7 messages)
- raoul_vanmaaren at live dot nl