Updated PHP version check to 5.5.9

This commit is contained in:
Hillel Coren 2016-02-28 14:09:42 +02:00
parent 2153a8e227
commit faa3a5e620
2 changed files with 5 additions and 2 deletions

View File

@ -48,6 +48,9 @@ class StartupCheck
$file = storage_path() . '/version.txt'; $file = storage_path() . '/version.txt';
$version = @file_get_contents($file); $version = @file_get_contents($file);
if ($version != NINJA_VERSION) { if ($version != NINJA_VERSION) {
if (version_compare(phpversion(), '5.5.9', '<')) {
dd('Please update PHP to >= 5.5.9');
}
$handle = fopen($file, 'w'); $handle = fopen($file, 'w');
fwrite($handle, NINJA_VERSION); fwrite($handle, NINJA_VERSION);
fclose($handle); fclose($handle);

View File

@ -26,8 +26,8 @@
<div class="jumbotron"> <div class="jumbotron">
<h2>Invoice Ninja Setup</h2> <h2>Invoice Ninja Setup</h2>
@if (version_compare(phpversion(), '5.4.0', '<')) @if (version_compare(phpversion(), '5.5.9', '<'))
<div class="alert alert-warning">Warning: The application requires PHP >= 5.4.0</div> <div class="alert alert-warning">Warning: The application requires PHP >= 5.5.9</div>
@endif @endif
@if (!function_exists('proc_open')) @if (!function_exists('proc_open'))
<div class="alert alert-warning">Warning: <a href="http://php.net/manual/en/function.proc-open.php" target="_blank">proc_open</a> must be enabled.</div> <div class="alert alert-warning">Warning: <a href="http://php.net/manual/en/function.proc-open.php" target="_blank">proc_open</a> must be enabled.</div>