From becd2eea9dbb26afaae136eabc9c54e95f41a532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rytis=20Slatkevi=C4=8Dius?= Date: Wed, 23 Jan 2019 22:28:58 +0200 Subject: [PATCH] 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 --- html/inc/util.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/html/inc/util.inc b/html/inc/util.inc index d5a3e28e9c..14d22c2569 100644 --- a/html/inc/util.inc +++ b/html/inc/util.inc @@ -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();