Skip to content

Commit

Permalink
Merge pull request #30780 from owncloud/stable10-57e5c791f3cec7eb9048…
Browse files Browse the repository at this point in the history
…83ddf8dbdbaacd1c6dd4

[stable10] Properly use error exit code when php version or platform …
  • Loading branch information
Vincent Petry authored Mar 19, 2018
2 parents a2dcb56 + 7986851 commit 7606acc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions console.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,21 @@
if (version_compare(PHP_VERSION, '5.6.0') === -1) {
echo 'This version of ownCloud requires at least PHP 5.6.0'.PHP_EOL;
echo 'You are currently running PHP ' . PHP_VERSION . '. Please update your PHP version.'.PHP_EOL;
return;
exit(1);
}

// Show warning if PHP 7.3 is used as ownCloud is not compatible with PHP 7.3
if (version_compare(PHP_VERSION, '7.3.0alpha1') !== -1) {
echo 'This version of ownCloud is not compatible with PHP 7.3' . PHP_EOL;
echo 'You are currently running PHP ' . PHP_VERSION . '.' . PHP_EOL;
return;
exit(1);
}

// running oC on Windows is unsupported since 8.1, this has to happen here because
// is seems that the autoloader on Windows fails later and just throws an exception.
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
echo 'ownCloud Server does not support Microsoft Windows.';
return;
exit(1);
}

function exceptionHandler($exception) {
Expand Down

0 comments on commit 7606acc

Please sign in to comment.