diff --git a/NEWS b/NEWS index 3987f73f801..d46c2514dde 100644 --- a/NEWS +++ b/NEWS @@ -71,6 +71,9 @@ PHP NEWS . Fixed bug GH-15169 (stack overflow when var serialization in ext/standard/var). (nielsdos) +- Windows: + . Fixed bug GH-16199 (GREP_HEADER() is broken). (Peter Kokot) + 26 Sep 2024, PHP 8.4.0RC1 - BcMath: diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 2fba54c0b4d..1a4ddbffaa9 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -965,14 +965,19 @@ function GREP_HEADER(header_name, regex, path_to_check) if (!c) { /* look in the include path */ + if (path_to_check == null) { + path_to_check = php_usual_include_suspects; + } else { + path_to_check += ";" + php_usual_include_suspects; + } var p = search_paths(header_name, path_to_check, "INCLUDE"); if (typeof(p) == "string") { - c = file_get_contents(p); + c = file_get_contents(p + "\\" + header_name); } else if (p == false) { p = search_paths(header_name, PHP_EXTRA_INCLUDES, null); if (typeof(p) == "string") { - c = file_get_contents(p); + c = file_get_contents(p + "\\" + header_name); } } if (!c) {