From c9cf2715f0ec10d51d881d386de9fa818f76af46 Mon Sep 17 00:00:00 2001 From: VirtualTam Date: Tue, 24 Nov 2015 01:36:12 +0100 Subject: application: move checkPHPVersion from Utils to ApplicationUtils Relates to #372 Signed-off-by: VirtualTam --- application/Utils.php | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'application/Utils.php') diff --git a/application/Utils.php b/application/Utils.php index 120333c5..b8579b48 100644 --- a/application/Utils.php +++ b/application/Utils.php @@ -119,26 +119,6 @@ function generateLocation($referer, $host, $loopTerms = array()) return $finalReferer; } -/** - * Checks the PHP version to ensure Shaarli can run - * - * @param string $minVersion minimum PHP required version - * @param string $curVersion current PHP version (use PHP_VERSION) - * - * @throws Exception the PHP version is not supported - */ -function checkPHPVersion($minVersion, $curVersion) -{ - if (version_compare($curVersion, $minVersion) < 0) { - throw new Exception( - 'Your PHP version is obsolete!' - .' Shaarli requires at least PHP '.$minVersion.', and thus cannot run.' - .' Your PHP version has known security vulnerabilities and should be' - .' updated as soon as possible.' - ); - } -} - /** * Validate session ID to prevent Full Path Disclosure. * -- cgit v1.2.3