Skip to content

Commit

Permalink
Do not allow page_head() to be called twice
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Rytiss authored Jan 23, 2019
1 parent b7e0a11 commit becd2ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions html/inc/util.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit becd2ee

Please sign in to comment.