Skip to content

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

@iinfo-dev-mk

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

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