Skip to content

Commit

Permalink
Symfony 6 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed Aug 18, 2022
1 parent 3e0766a commit b0aa6c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Controller/RenderElementController.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ private function renderElement($id, $table)
throw new \InvalidArgumentException('Table "'.$act.'" is not supported');
}

if (!defined('BE_USER_LOGGED_IN') && !defined('FE_USER_LOGGED_IN') && $this->has('contao.security.token_checker')) {
$tokenChecker = $this->get('contao.security.token_checker');
if (!defined('BE_USER_LOGGED_IN') && !defined('FE_USER_LOGGED_IN') && $this->container->has('contao.security.token_checker')) {
$tokenChecker = $this->container->get('contao.security.token_checker');
define('FE_USER_LOGGED_IN', $tokenChecker->hasFrontendUser());
define('BE_USER_LOGGED_IN', $tokenChecker->isPreviewMode());
}
Expand Down

0 comments on commit b0aa6c8

Please sign in to comment.