Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
BE_USER_LOGGED_IN may be undefined, set it to false if so
  • Loading branch information
saibotd authored Jun 25, 2019
1 parent 29413dc commit a472a10
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Controller/ContentApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ private function init(Request $request): Request
// Initialize Contao
$this->container->get('contao.framework')->initialize();
$this->apiUser = new ApiUser();
if (!defined('BE_USER_LOGGED_IN')) {
define('BE_USER_LOGGED_IN', false);
}
if (isset($GLOBALS['TL_HOOKS']['apiAfterInit']) && is_array($GLOBALS['TL_HOOKS']['apiAfterInit'])) {
foreach ($GLOBALS['TL_HOOKS']['apiAfterInit'] as $callback) {
$request = $callback[0]::$callback[1]($request);
Expand Down

0 comments on commit a472a10

Please sign in to comment.