Skip to content

Commit ba64ec0

Browse files
committed
improve zlib version check for tests
1 parent f258e9b commit ba64ec0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ext/zlib/tests/func.inc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ function get_zlib_version()
88
phpinfo();
99
$info = ob_get_contents();
1010
ob_end_clean();
11-
if (preg_match(',zlib.*Compiled Version => (\d+\.\d+\.\d+),s', $info, $match)) {
12-
$version = $match[1];
11+
//if (preg_match(',zlib.*Compiled Version => (\d+\.\d+\.\d+),s', $info, $match)) {
12+
// $version = $match[1];
13+
if (preg_match(',zlib(?!.*libXML).*Compiled Version (=> |</).*(\d+\.\d+\.\d+?),sU', $info, $match)) {
14+
$version = $match[2];
1315
}
1416

1517
return $version;

0 commit comments

Comments
 (0)