From ad87b40d318065dea9c42e29f21b11585d961576 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Tue, 9 May 2023 11:43:11 +0200 Subject: [PATCH] fix phpstan mixed warning --- src/Install.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Install.php b/src/Install.php index f105041..0adca1b 100644 --- a/src/Install.php +++ b/src/Install.php @@ -22,9 +22,10 @@ class Install extends dcNsProcess { public static function init(): bool { - static::$init = defined('DC_CONTEXT_ADMIN') - && My::phpCompliant() - && dcCore::app()->newVersion(My::id(), dcCore::app()->plugins->moduleInfo(My::id(), 'version')); + if (defined('DC_CONTEXT_ADMIN') && My::phpCompliant()) { + $version = dcCore::app()->plugins->moduleInfo(My::id(), 'version'); + static::$init = is_string($version) ? dcCore::app()->newVersion(My::id(), $version) : true; + } return static::$init; }