Skip to content

Preserve PHP 8.5 fatal error backtraces - #19572

Merged
markstory merged 1 commit into
cakephp:5.xfrom
jaydenireland:issue-19571-fatal-error-backtraces
Jul 31, 2026
Merged

markstory merged 1 commit into
cakephp:5.xfrom
jaydenireland:issue-19571-fatal-error-backtraces

Conversation

@jaydenireland

Copy link
Copy Markdown
Contributor

Fixes #19571.

Summary

  • Preserve the fatal-error trace supplied by error_get_last() on PHP 8.5+.
  • Format the trace without arguments so sensitive values are not exposed.
  • Keep the existing output on PHP 8.2–8.4, where no fatal-error trace is available.

Tests

  • vendor/bin/phpunit tests/TestCase/Error/ExceptionTrapTest.php
  • php -l src/Error/ExceptionTrap.php
  • php -l tests/TestCase/Error/ExceptionTrapTest.php
  • git diff --check

@dereuromark dereuromark added this to the 5.4.1 milestone Jul 30, 2026
@jaydenireland
jaydenireland marked this pull request as ready for review July 30, 2026 12:42
@markstory markstory modified the milestones: 5.4.1, 5.4.2 Jul 31, 2026
@markstory
markstory merged commit ceeda19 into cakephp:5.x Jul 31, 2026
15 checks passed
@markstory

Copy link
Copy Markdown
Member

Thank you 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ExceptionTrap discards PHP 8.5 fatal-error backtraces

3 participants