mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
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:
parent
50dfc436cd
commit
e915ed75ea
2 changed files with 10 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue