From: Dimitar Dimitrov Date: Fri, 15 Mar 2013 22:47:53 +0000 (+0100) Subject: Compare versions in a more robust way. X-Git-Tag: 1.7.5~179^2~2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=737ef4dcc25f73daa3200dd7e53ef47161a104db;p=tt-rss.git Compare versions in a more robust way. --- diff --git a/include/sanity_check.php b/include/sanity_check.php index 2a39cfa4..427457d8 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("5.3.0", phpversion()) == 1) { + if (version_compare(PHP_VERSION, '5.3.0', '>=')) { array_push($errors, "PHP version 5.3.0 or newer required."); }