mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: Use version_compare to test for correct PHP version.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84142 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
575bb1a3f5
commit
cac8686b3b
4
main.php
4
main.php
@ -12,8 +12,8 @@
|
||||
* @package sapphire
|
||||
* @subpackage core
|
||||
*/
|
||||
$majorVersion = strtok(phpversion(),'.');
|
||||
if($majorVersion < 5) {
|
||||
|
||||
if(version_compare(phpversion(), 5, '<')) {
|
||||
header("HTTP/1.1 500 Server Error");
|
||||
echo str_replace('$PHPVersion', phpversion(), file_get_contents("dev/install/php5-required.html"));
|
||||
die();
|
||||
|
Loading…
Reference in New Issue
Block a user