Skip to content

when session isn't started user panel templates throw nette exception #7

Description

@iinfo-dev-mk

When session isn't started and Tracy with user panel and tab (Bridges/SecurityTracy/templates/UserPanel*.phtml) is used, nette exception (or php warning) 'Cannot send header after HTTP headers have been sent' is presented.

It's because of both templates directly check (e.g. there) nette user which tries to start session.

Suggested Solution: to check if session is started before nette user/identity is checked - e.g.

<?php if (session_id() && $user->isLoggedIn()): ?>Logged in<?php else: ?>Unlogged<?php endif ?>

Described problem is presented in both templates - UserPanel.panel.phtml, UserPanel.tab.phtml

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions