From 24c44b260fd67a42422d76bb46fcd9ff6af5db30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20K=C5=99=C3=AD=C5=BE?= Date: Mon, 24 Nov 2014 09:42:18 +0100 Subject: [PATCH] UserPanel: is rendered when headers are not sent or session is active --- src/Bridges/SecurityTracy/UserPanel.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Bridges/SecurityTracy/UserPanel.php b/src/Bridges/SecurityTracy/UserPanel.php index 2396235c..abfd88b5 100644 --- a/src/Bridges/SecurityTracy/UserPanel.php +++ b/src/Bridges/SecurityTracy/UserPanel.php @@ -35,7 +35,13 @@ public function __construct(Nette\Security\User $user) public function getTab() { if (headers_sent()) { - return; + if (PHP_VERSION >= 50400) { + if (session_status() !== PHP_SESSION_ACTIVE) { + return; + } + } elseif (session_id() === '') { + return; + } } ob_start();