diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-08-10 23:03:35 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-08-10 23:03:35 +0200 |
commit | 9650f3ecbebfc7c7cc30b787acae3490b0f4e6b5 (patch) | |
tree | 80d1c50a805bbd0507a8de495caba39e490d5706 /settings | |
parent | 54aa57b47a9bd8f7e6f2f81f1b229eb19c1e135b (diff) | |
parent | 72ba67815ed15aac9d9511504f61f8c5fa73bff4 (diff) | |
download | nextcloud-server-9650f3ecbebfc7c7cc30b787acae3490b0f4e6b5.tar.gz nextcloud-server-9650f3ecbebfc7c7cc30b787acae3490b0f4e6b5.zip |
Merge pull request #17919 from rullzer/php_supported_check
Display warning in security & setup warnings if php version is EOL
Diffstat (limited to 'settings')
-rw-r--r-- | settings/controller/checksetupcontroller.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/settings/controller/checksetupcontroller.php b/settings/controller/checksetupcontroller.php index f849e3ed565..ff605b474e2 100644 --- a/settings/controller/checksetupcontroller.php +++ b/settings/controller/checksetupcontroller.php @@ -175,6 +175,23 @@ class CheckSetupController extends Controller { return ''; } + + /* + * Whether the php version is still supported (at time of release) + * according to: https://secure.php.net/supported-versions.php + * + * @return array + */ + private function isPhpSupported() { + $eol = false; + + //PHP 5.4 is EOL on 14 Sep 2015 + if (version_compare(PHP_VERSION, '5.5.0') === -1) { + $eol = true; + } + + return ['eol' => $eol, 'version' => PHP_VERSION]; + } /** * @return DataResponse @@ -189,6 +206,7 @@ class CheckSetupController extends Controller { 'isUrandomAvailable' => $this->isUrandomAvailable(), 'securityDocs' => $this->urlGenerator->linkToDocs('admin-security'), 'isUsedTlsLibOutdated' => $this->isUsedTlsLibOutdated(), + 'phpSupported' => $this->isPhpSupported(), ] ); } |