Commit 21160846c38 for php
commit 21160846c389a273da0a0703480f77d6d4dca7c8
Author: Lazizbek Ergashev <lazerg2@gmail.com>
Date: Wed Sep 30 00:39:03 2026 +0000
Fix GH-24006: Skip gh18431.phpt when libzip lacks progress callbacks (#24009)
ZipArchive::registerProgressCallback() is only available when PHP is built
against libzip 1.3.0 or newer. Skip gh18431.phpt when the method is absent
to avoid an undefined method error, as the other progress callback tests
already do.
Closes #24009
diff --git a/ext/zip/tests/gh18431.phpt b/ext/zip/tests/gh18431.phpt
index d4eb89c36c6..b4225238ac3 100644
--- a/ext/zip/tests/gh18431.phpt
+++ b/ext/zip/tests/gh18431.phpt
@@ -2,6 +2,12 @@
GH-18431 (Registering ZIP progress callback twice doesn't work)
--EXTENSIONS--
zip
+--SKIPIF--
+<?php
+if (!method_exists(ZipArchive::class, 'registerProgressCallback')) {
+ die('skip progress callbacks are not supported');
+}
+?>
--FILE--
<?php
$file = __DIR__ . '/gh18431.zip';