Do not allow page_head() to be called twice

error_page() calls page_head(), but there are instances of code that call error_page() having already called page_head() before, thus attempting to send headers twice and creating double page header.

Fixes #2960
This commit is contained in:
Rytis Slatkevičius 2019-01-23 22:28:58 +02:00 committed by GitHub
parent b7e0a11db6
commit becd2eea9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -243,6 +243,10 @@ function page_head(
global $caching, $cache_control_extra, $did_page_head;
global $is_login_page, $fixed_navbar;
if ($did_page_head) {
return;
}
$did_page_head = true;
$url_base = url_base();