com php-src: improve zlib version check for tests: ext/zlib/tests/func.inc
[email protected] (Anatol Belski)
| Newsgroups | php.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: ba64ec0b1331697bd71e70bf20c9a5c3c3c02136 Author: Anatol Belski <[email protected]> Wed, 22 Mar 2017 11:04:08 +0100 Parents: f258e9b803380e743e40ba45fd7cbd58442a25e8 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ba64ec0b1331697bd71e70bf20c9a5c3c3c02136 Log: improve zlib version check for tests Changed paths: M ext/zlib/tests/func.inc Diff: diff --git a/ext/zlib/tests/func.inc b/ext/zlib/tests/func.inc index 0a422ca..e431afe 100644 --- a/ext/zlib/tests/func.inc +++ b/ext/zlib/tests/func.inc @@ -8,8 +8,10 @@ function get_zlib_version() phpinfo(); $info = ob_get_contents(); ob_end_clean(); - if (preg_match(',zlib.*Compiled Version => (\d+\.\d+\.\d+),s', $info, $match)) { - $version = $match[1]; + //if (preg_match(',zlib.*Compiled Version => (\d+\.\d+\.\d+),s', $info, $match)) { + // $version = $match[1]; + if (preg_match(',zlib(?!.*libXML).*Compiled Version (=> |</).*(\d+\.\d+\.\d+?),sU', $info, $match)) { + $version = $match[2]; } return $version;