diff options
author | VirtualTam <virtualtam@flibidi.net> | 2015-11-24 01:36:12 +0100 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2015-11-24 01:40:44 +0100 |
commit | c9cf2715f0ec10d51d881d386de9fa818f76af46 (patch) | |
tree | 013c6f7c590ed936ca7d3244e1ed89c470500df4 /application/Utils.php | |
parent | 0def004963c62ff1edfce16272a87ba9f0c87e16 (diff) | |
download | Shaarli-c9cf2715f0ec10d51d881d386de9fa818f76af46.tar.gz Shaarli-c9cf2715f0ec10d51d881d386de9fa818f76af46.tar.zst Shaarli-c9cf2715f0ec10d51d881d386de9fa818f76af46.zip |
application: move checkPHPVersion from Utils to ApplicationUtils
Relates to #372
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'application/Utils.php')
-rw-r--r-- | application/Utils.php | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/application/Utils.php b/application/Utils.php index 120333c5..b8579b48 100644 --- a/application/Utils.php +++ b/application/Utils.php | |||
@@ -120,26 +120,6 @@ function generateLocation($referer, $host, $loopTerms = array()) | |||
120 | } | 120 | } |
121 | 121 | ||
122 | /** | 122 | /** |
123 | * Checks the PHP version to ensure Shaarli can run | ||
124 | * | ||
125 | * @param string $minVersion minimum PHP required version | ||
126 | * @param string $curVersion current PHP version (use PHP_VERSION) | ||
127 | * | ||
128 | * @throws Exception the PHP version is not supported | ||
129 | */ | ||
130 | function checkPHPVersion($minVersion, $curVersion) | ||
131 | { | ||
132 | if (version_compare($curVersion, $minVersion) < 0) { | ||
133 | throw new Exception( | ||
134 | 'Your PHP version is obsolete!' | ||
135 | .' Shaarli requires at least PHP '.$minVersion.', and thus cannot run.' | ||
136 | .' Your PHP version has known security vulnerabilities and should be' | ||
137 | .' updated as soon as possible.' | ||
138 | ); | ||
139 | } | ||
140 | } | ||
141 | |||
142 | /** | ||
143 | * Validate session ID to prevent Full Path Disclosure. | 123 | * Validate session ID to prevent Full Path Disclosure. |
144 | * | 124 | * |
145 | * See #298. | 125 | * See #298. |