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; }