Skip to content

Commit e915ed7

Browse files
petkcmb69
authored andcommitted
Fix GH-16199: GREP_HEADER() is broken
This also fixes the libxml version check when the libxml/xmlversion.h is located elsewhere than libxml2 include directory. Closes GH-15619.
1 parent 50dfc43 commit e915ed7

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ PHP NEWS
7171
. Fixed bug GH-15169 (stack overflow when var serialization in
7272
ext/standard/var). (nielsdos)
7373

74+
- Windows:
75+
. Fixed bug GH-16199 (GREP_HEADER() is broken). (Peter Kokot)
76+
7477
26 Sep 2024, PHP 8.4.0RC1
7578

7679
- BcMath:

win32/build/confutils.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -965,14 +965,19 @@ function GREP_HEADER(header_name, regex, path_to_check)
965965

966966
if (!c) {
967967
/* look in the include path */
968+
if (path_to_check == null) {
969+
path_to_check = php_usual_include_suspects;
970+
} else {
971+
path_to_check += ";" + php_usual_include_suspects;
972+
}
968973

969974
var p = search_paths(header_name, path_to_check, "INCLUDE");
970975
if (typeof(p) == "string") {
971-
c = file_get_contents(p);
976+
c = file_get_contents(p + "\\" + header_name);
972977
} else if (p == false) {
973978
p = search_paths(header_name, PHP_EXTRA_INCLUDES, null);
974979
if (typeof(p) == "string") {
975-
c = file_get_contents(p);
980+
c = file_get_contents(p + "\\" + header_name);
976981
}
977982
}
978983
if (!c) {

0 commit comments

Comments
 (0)