BASE_HREF is always defined, but sometimes defined as null

This commit is contained in:
Shish 2020-02-01 23:42:40 +00:00
parent 05b4cd96dc
commit f70bce113d

View File

@ -371,7 +371,7 @@ function zglob(string $pattern): array
*/ */
function get_base_href(): string function get_base_href(): string
{ {
if (defined("BASE_HREF")) { if (defined("BASE_HREF") && !empty(BASE_HREF)) {
return BASE_HREF; return BASE_HREF;
} }
$possible_vars = ['SCRIPT_NAME', 'PHP_SELF', 'PATH_INFO', 'ORIG_PATH_INFO']; $possible_vars = ['SCRIPT_NAME', 'PHP_SELF', 'PATH_INFO', 'ORIG_PATH_INFO'];