From ddb596740329d07a3639ba9f934ea9467e9d4ed6 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Tue, 25 Apr 2023 15:35:26 +0200 Subject: [PATCH] fix nullsafe warnings --- _define.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_define.php b/_define.php index decbebc..367bc95 100644 --- a/_define.php +++ b/_define.php @@ -10,7 +10,7 @@ * @copyright Jean-Christian Denis * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html */ -if (!defined('DC_RC_PATH')) { +if (!defined('DC_RC_PATH') || is_null(dcCore::app()->auth)) { return null; } @@ -22,7 +22,7 @@ $this->registerModule( [ 'requires' => [['core', '2.24']], 'permissions' => dcCore::app()->auth->makePermissions([ - dcAuth::PERMISSION_ADMIN, + dcCore::app()->auth::PERMISSION_ADMIN, ]), 'type' => 'plugin', 'support' => 'https://github.com/JcDenis/' . basename(__DIR__),