Skip to content

Commit 1c78850

Browse files
committed
fix dl fatal error
1 parent 7d0f525 commit 1c78850

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

run-tests.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -877,22 +877,20 @@ function write_information(): void
877877
$ext_dir = ini_get('extension_dir');
878878
foreach (scandir($ext_dir) as $file) {
879879
if (preg_match('/^(?:php_)?([_a-zA-Z0-9]+)\.(?:so|dll)$/', $file, $matches)) {
880+
// workaround dl('mysqli') fatal error
880881
// remove once https://github.com/php/php-src/issues/9196 is fixed
881-
// @dl() is fast (about 1 ms / dl() call)
882-
if (extension_loaded($matches[1])) {
882+
if ($matches[1] === 'mysqli') {
883883
continue;
884884
}
885885
886-
if (dl($matches[1])) {
886+
if (@dl($matches[1])) {
887887
$exts[] = $matches[1];
888-
$exts[] = microtime(true) - $t;
889888
}
890889
}
891890
}
892891
echo implode(',', $exts);
893892
PHP);
894893
$extensionsNames = explode(',', shell_exec("$php $pass_options $info_params $no_file_cache \"$info_file\""));
895-
print_r($extensionsNames);echo "\nxxxxxx\n\n\n";
896894
$exts_to_test = array_unique(remap_loaded_extensions_names($extensionsNames));
897895
// check for extensions that need special handling and regenerate
898896
$info_params_ex = [

0 commit comments

Comments
 (0)