From: Andrew Dolgov Date: Sat, 16 Mar 2013 08:06:34 +0000 (+0400) Subject: make version checks a bit more readable X-Git-Tag: 1.7.5~178 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=1b113281ffa3c0fad96b139df39de566567b8d9d;p=tt-rss.git make version checks a bit more readable --- diff --git a/include/sanity_check.php b/include/sanity_check.php index 3e883291..5cb55674 100644 --- a/include/sanity_check.php +++ b/include/sanity_check.php @@ -20,7 +20,7 @@ array_push($errors, "Please don't run this script as root."); } - if (!(version_compare(PHP_VERSION, '5.3.0', '>='))) { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { array_push($errors, "PHP version 5.3.0 or newer required."); } diff --git a/index.php b/index.php index 4d1ff795..6584d8d2 100644 --- a/index.php +++ b/index.php @@ -7,7 +7,7 @@ // we need a separate check here because functions.php might get parsed // incorrectly before 5.3 because of :: syntax. - if (!(version_compare(PHP_VERSION, '5.3.0', '>='))) { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { print "Fatal Error: PHP version 5.3.0 or newer required.\n"; exit; }