From d84442b2f537d10f06298af2a145564e007b2470 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Fri, 17 Mar 2023 21:18:56 +0100 Subject: [PATCH] split check --- src/Install.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Install.php b/src/Install.php index 73b1e82..b865cc1 100644 --- a/src/Install.php +++ b/src/Install.php @@ -22,9 +22,10 @@ class Install extends dcNsProcess { public static function init(): bool { - self::$init = defined('DC_CONTEXT_ADMIN') - && version_compare(phpversion(), My::PHP_MIN, '>=') - && dcCore::app()->newVersion(My::id(), dcCore::app()->plugins->moduleInfo(My::id(), 'version')); + if (defined('DC_CONTEXT_ADMIN')) { + self::$init = version_compare(phpversion(), My::PHP_MIN, '>=') + && dcCore::app()->newVersion(My::id(), dcCore::app()->plugins->moduleInfo(My::id(), 'version')); + } return self::$init; }