Compare versions in a more robust way.

This commit is contained in:
Dimitar Dimitrov 2013-03-15 23:47:53 +01:00
parent 8c4f63fa9a
commit 737ef4dcc2
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@
array_push($errors, "Please don't run this script as root."); 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."); array_push($errors, "PHP version 5.3.0 or newer required.");
} }