mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
fix regex to detect valgrind version
New PCRE version got stricter
This commit is contained in:
parent
363ff60475
commit
f46200bcc0
1 changed files with 1 additions and 1 deletions
|
@ -581,7 +581,7 @@ if (isset($argc) && $argc > 1) {
|
|||
if (!$valgrind_header) {
|
||||
error("Valgrind returned no version info, cannot proceed.\nPlease check if Valgrind is installed.");
|
||||
} else {
|
||||
$valgrind_version = preg_replace("/valgrind-([0-9])\.([0-9])\.([0-9]+)([.-\w]+)?(\s+)/", '$1$2$3', $valgrind_header, 1, $replace_count);
|
||||
$valgrind_version = preg_replace("/valgrind-(\d)\.(\d)\.(\d+)([.\w_-]+)?(\s+)/", '$1$2$3', $valgrind_header, 1, $replace_count);
|
||||
if ($replace_count != 1 || !is_numeric($valgrind_version)) {
|
||||
error("Valgrind returned invalid version info (\"$valgrind_header\"), cannot proceed.");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue