[php-src] PR #22679: Fix GH-22671: assert.bail must not unwind with a pending exception

From: Date: Fri, 10 Jul 2026 16:04:52 +0000
Subject: [php-src] PR #22679: Fix GH-22671: assert.bail must not unwind with a pending exception
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-36960@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/22679 Author: iliaal assert.bail called zend_throw_unwind_exit() (which requires no pending exception) right after printing the callback's exception, but that printing can itself re-throw (a throwing __toString or __destruct, or the stack guard re-tripping). Now it only unwinds when nothing is pending, otherwise the exception propagates, matching exit() and phar. The regression test re-throws from both __toString and __destruct, so it is deterministic and compiler-independent (unlike the reporter's stack-layout-sensitive recursion). Fixes #22671

« previous php.git-pulls (#36960) next »