mirror of
https://github.com/humhub/humhub.git
synced 2025-03-14 20:19:47 +01:00
Improved PHP Min Version Check (#5846)
This commit is contained in:
parent
c577bf5fc6
commit
aeb046df1f
@ -9,6 +9,7 @@ HumHub Changelog
|
||||
- Fix #5814: Fix numerated lists in mail summary content
|
||||
- Fix #5830: Fix cron job of search index rebuilding
|
||||
- Fix #5838: Fix deprecated null value for `file_exists()` on PHP 8.1
|
||||
- Enh #5846: Improved PHP minimum version checks
|
||||
- Fix #5845: Fix unknown `streamQuery` on load `Filter`
|
||||
|
||||
1.12.0 (July 27, 2022)
|
||||
|
@ -49,6 +49,22 @@ class Application extends \yii\web\Application
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
if (version_compare(phpversion(), $this->minSupportedPhpVersion, '<')) {
|
||||
throw new \Exception(sprintf(
|
||||
'Installed PHP Version is too old! Required minimum version is PHP %s (Installed: %s)',
|
||||
$this->minSupportedPhpVersion,
|
||||
phpversion()
|
||||
));
|
||||
}
|
||||
|
||||
parent::init();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
|
@ -57,8 +57,12 @@ class Application extends \yii\console\Application
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
if (version_compare(phpversion(), '5.6', '<')) {
|
||||
throw new Exception('Installed PHP Version is too old! Required minimum version is PHP 5.6 (Installed: ' . phpversion() . ')');
|
||||
if (version_compare(phpversion(), $this->minSupportedPhpVersion, '<')) {
|
||||
throw new Exception(sprintf(
|
||||
'Installed PHP Version is too old! Required minimum version is PHP %s (Installed: %s)',
|
||||
$this->minSupportedPhpVersion,
|
||||
phpversion()
|
||||
));
|
||||
}
|
||||
|
||||
if (BaseSettingsManager::isDatabaseInstalled()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user