From af36177b03e168ff9f45569651548118f8f59437 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Thu, 28 Jul 2022 11:22:26 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B04517=20-=20PHP=208.1:=20Fix=20false=20to?= =?UTF-8?q?=20array=20conversion=20which=20is=20longer=20allowed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup/runtimeenv.class.inc.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/setup/runtimeenv.class.inc.php b/setup/runtimeenv.class.inc.php index b1928cbb6..cdd1b677a 100644 --- a/setup/runtimeenv.class.inc.php +++ b/setup/runtimeenv.class.inc.php @@ -812,10 +812,14 @@ class RunTimeEnvironment // Database is created, installation has been tracked into it return true; } - + + /** + * @param \Config $oConfig + * + * @return array|false + */ public function GetApplicationVersion(Config $oConfig) { - $aResult = false; try { CMDBSource::InitFromConfig($oConfig); @@ -829,7 +833,8 @@ class RunTimeEnvironment $this->log_error('Exception '.$e->getMessage()); return false; } - + + $aResult = []; // Scan the list of installed modules to get the version of the 'ROOT' module which holds the main application version foreach ($aSelectInstall as $aInstall) { @@ -867,7 +872,7 @@ class RunTimeEnvironment $aResult['datamodel_version'] = $aResult['product_version']; } $this->log_info("GetApplicationVersion returns: product_name: ".$aResult['product_name'].', product_version: '.$aResult['product_version']); - return $aResult; + return empty($aResult) ? false : $aResult; } public static function MakeDirSafe($sDir)