From: Tim Düsterhus Date: Wed, 11 May 2022 12:02:15 +0000 (+0200) Subject: Add update_com.woltlab.wcf_5.5_checkSystemRequirements.php X-Git-Tag: 6.0.0_Alpha_1~1330 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ad01a4736689a08626bb3be7a621007c617b4f31;p=GitHub%2FWoltLab%2FWCF.git Add update_com.woltlab.wcf_5.5_checkSystemRequirements.php see 48b47a4a8ba0260d52226c80063ebac081fa719b --- diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.5_checkSystemRequirements.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.5_checkSystemRequirements.php new file mode 100644 index 0000000000..022014e0cf --- /dev/null +++ b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.5_checkSystemRequirements.php @@ -0,0 +1,24 @@ + + * @package WoltLabSuite\Core + */ + +use wcf\system\WCF; + +$phpVersion = \PHP_VERSION; +$neededPhpVersion = '8.1.2'; +if (!\version_compare($phpVersion, $neededPhpVersion, '>=')) { + if (WCF::getLanguage()->getFixedLanguageCode() === 'de') { + $message = "Ihre PHP-Version '{$phpVersion}' ist unzureichend für die Installation dieser Software. PHP-Version {$neededPhpVersion} oder höher wird benötigt."; + } else { + $message = "Your PHP version '{$phpVersion}' is insufficient for installation of this software. PHP version {$neededPhpVersion} or greater is required."; + } + + throw new \RuntimeException($message); +}