From a472a1046ba806e042efcecc1ba76c2fb8c03dbb Mon Sep 17 00:00:00 2001 From: Tobias Duehr Date: Tue, 25 Jun 2019 15:33:34 +0200 Subject: [PATCH] Bugfix BE_USER_LOGGED_IN may be undefined, set it to false if so --- src/Controller/ContentApiController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Controller/ContentApiController.php b/src/Controller/ContentApiController.php index 22b1060..0cc973f 100644 --- a/src/Controller/ContentApiController.php +++ b/src/Controller/ContentApiController.php @@ -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);