From 357d1431214b6cf3c894d4399e0e249cd6fb1df7 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sun, 23 Apr 2023 20:29:44 +0200 Subject: [PATCH] fix nullsafe warnings --- _define.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_define.php b/_define.php index bc24328..d419f00 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,8 +22,8 @@ $this->registerModule( [ 'requires' => [['core', '2.26']], 'permissions' => dcCore::app()->auth->makePermissions([ - dcAuth::PERMISSION_USAGE, - dcAuth::PERMISSION_CONTENT_ADMIN, + dcCore::app()->auth::PERMISSION_USAGE, + dcCore::app()->auth::PERMISSION_CONTENT_ADMIN, ]), 'type' => 'plugin', 'support' => 'http://forum.dotclear.org/viewforum.php?id=16',