]> git.wh0rd.org - tt-rss.git/commitdiff
sanity: add php version check
authorAndrew Dolgov <fox@fakecake.org>
Thu, 23 Aug 2012 19:17:32 +0000 (23:17 +0400)
committerAndrew Dolgov <fox@fakecake.org>
Thu, 23 Aug 2012 19:17:32 +0000 (23:17 +0400)
include/sanity_check.php

index 80ca7822f02c62110c96e9ef67f9497676cebdca..5e34b2f379e56b57401695a7b4a4bdec3f2e6f50 100644 (file)
                                array_push($errors, "Please don't run this script as root.");
                        }
 
+                       if (version_compare("5.2.0", phpversion()) == 1) {
+                               array_push($errors, "PHP version 5.2.0 or newer required.");
+                       }
+
                        if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) {
                                array_push($errors, "Configuration file (config.php) has incorrect version. Update it with new options from config.php-dist and set CONFIG_VERSION to the correct value.");
                        }