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:
Sam Minnee 2009-08-11 03:50:40 +00:00
parent 575bb1a3f5
commit cac8686b3b

View File

@ -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();