This commit is contained in:
Shish
2024-02-08 00:50:41 +00:00
parent 1edb7b6126
commit fed8e43e36
3 changed files with 8 additions and 4 deletions

View File

@@ -736,12 +736,12 @@ function _get_query(): string
}
// if we're just looking at index.php, use the default query
if(str_ends_with($parts["path"], "index.php")) {
if(str_ends_with($parts["path"] ?? "", "index.php")) {
return "/";
}
// otherwise, use the request URI minus the base path
return substr($parts["path"], strlen(get_base_href()));
return substr($parts["path"] ?? "", strlen(get_base_href()));
}