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.
This commit is contained in:
Peter Kokot 2024-08-28 17:08:30 +02:00 committed by Christoph M. Becker
parent 50dfc436cd
commit e915ed75ea
No known key found for this signature in database
GPG key ID: D66C9593118BCCB6
2 changed files with 10 additions and 2 deletions

View file

@ -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) {