diff --git a/administrator/language/en-GB/en-GB.plg_quickicon_phpversioncheck.ini b/administrator/language/en-GB/en-GB.plg_quickicon_phpversioncheck.ini index c7b1575250fd9..2bfdc319b4fee 100644 --- a/administrator/language/en-GB/en-GB.plg_quickicon_phpversioncheck.ini +++ b/administrator/language/en-GB/en-GB.plg_quickicon_phpversioncheck.ini @@ -8,4 +8,6 @@ PLG_QUICKICON_PHPVERSIONCHECK="Quick Icon - PHP Version Check" PLG_QUICKICON_PHPVERSIONCHECK_SECURITY_ONLY="Your PHP version, %1$s, is only receiving security fixes from the PHP project at this time. This means your PHP version will soon no longer be supported. We recommend planning to upgrade to a newer PHP version before it reaches end of support on %2$s. Joomla will be faster and more secure if you upgrade to a newer PHP version. Please contact your host for upgrade instructions." ; Key 1 is the server's current PHP version, key 2 is the recommended PHP version, and key 3 is the date at which support will end for the recommended PHP version PLG_QUICKICON_PHPVERSIONCHECK_UNSUPPORTED="We have detected that your server is using PHP %1$s which is obsolete and no longer receives official security updates by its developers. The Joomla! Project recommends upgrading your site to PHP %2$s or later which will receive security updates at least until %3$s. Please ask your host to make PHP %2$s or a later version the default version for your site. If your host is already PHP %2$s ready please enable PHP %2$s on your site's root and 'administrator' directories – typically you can do this yourself through a tool in your hosting control panel, but it's best to ask your host if you are unsure." +; Key 1 is the server's current PHP version +PLG_QUICKICON_PHPVERSIONCHECK_UNSUPPORTED_JOOMLA_OUTDATED="We have detected that your server is using PHP %1$s which is obsolete and no longer receives official security updates by its developers. Furthermore, we cannot recommend a newer PHP version because you are using an outdated Joomla! version. We recommend updating Joomla! and then following further PHP upgrade instructions." PLG_QUICKICON_PHPVERSIONCHECK_XML_DESCRIPTION="Checks the support status of your installation's PHP version and raises a warning if not fully supported." diff --git a/plugins/quickicon/phpversioncheck/phpversioncheck.php b/plugins/quickicon/phpversioncheck/phpversioncheck.php index 26e69df152c06..ef6b5bb5c4b2c 100644 --- a/plugins/quickicon/phpversioncheck/phpversioncheck.php +++ b/plugins/quickicon/phpversioncheck/phpversioncheck.php @@ -171,20 +171,23 @@ private function getPhpSupport() if (version_compare($version, $activePhpVersion, 'ge') && ($today < $versionEndOfSupport)) { - $recommendedVersion = $version; - $recommendedVersionEndOfSupport = $versionEndOfSupport; - - break; + $supportStatus['status'] = self::PHP_UNSUPPORTED; + $supportStatus['message'] = JText::sprintf( + 'PLG_QUICKICON_PHPVERSIONCHECK_UNSUPPORTED', + PHP_VERSION, + $version, + $versionEndOfSupport->format(JText::_('DATE_FORMAT_LC4')) + ); + + return $supportStatus; } } + // PHP version is not supported and we don't know of any supported versions. $supportStatus['status'] = self::PHP_UNSUPPORTED; - $supportStatus['message'] = JText::sprintf( - 'PLG_QUICKICON_PHPVERSIONCHECK_UNSUPPORTED', - PHP_VERSION, - $recommendedVersion, - $recommendedVersionEndOfSupport->format(JText::_('DATE_FORMAT_LC4')) - ); + $supportStatus['message'] = JText::sprintf('PLG_QUICKICON_PHPVERSIONCHECK_UNSUPPORTED_JOOMLA_OUTDATED', PHP_VERSION); + + return $supportStatus; } // If the version is still supported, check if it has reached eol minus 3 month