[php-src] master: Fix GH-23899 destructor test expectation

From: Date: Sun, 27 Sep 2026 17:37:23 +0000
Subject: [php-src] master: Fix GH-23899 destructor test expectation
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-141604@lists.php.net to get a copy of this message
Author: Weilin Du (LamentXU123) Date: 2026-09-28T01:36:27+08:00 Commit: https://github.com/php/php-src/commit/fe81f3d2b40a39b8cce73a2493759365bffe4c3b Raw diff: https://github.com/php/php-src/commit/fe81f3d2b40a39b8cce73a2493759365bffe4c3b.diff Fix GH-23899 destructor test expectation The cancel callback returns a ThrowingDestructor object, which is not a valid integer return value. Return-type validation reports a TypeError during shutdown, so expecting only "Done" is incorrect. Use EXPECTF to include the error while allowing the shutdown filename and line number to vary. Changed paths: M ext/zip/tests/gh23899_destructor.phpt Diff: diff --git a/ext/zip/tests/gh23899_destructor.phpt b/ext/zip/tests/gh23899_destructor.phpt index fad10717e592..04a33f150986 100644 --- a/ext/zip/tests/gh23899_destructor.phpt +++ b/ext/zip/tests/gh23899_destructor.phpt @@ -28,5 +28,10 @@ echo "Done\n"; <?php @unlink(__DIR__ . '/gh23899_destructor.zip'); ?> ---EXPECT-- +--EXPECTF-- Done + +Fatal error: Uncaught TypeError: Return value of callback provided to ZipArchive::registerCancelCallback() must be of type int, ThrowingDestructor returned in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d

« previous php.cvs (#141604) next »