Skip to content

Commit

Permalink
SessionLocaleResolver: skip if session does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
mabar committed Jun 26, 2023
1 parent 5b12a21 commit db03d75
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Bridge/NetteHttp/SessionLocaleResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ public function __construct(Session $session, IResponse $response)

public function resolve(Locales $locales, LocaleProcessor $localeProcessor): ?Locale
{
if (!$this->session->exists()) {
return null;
}

if (!$this->session->isStarted() && $this->response->isSent()) {
trigger_error(
sprintf(
Expand Down

0 comments on commit db03d75

Please sign in to comment.