Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable10] Properly use error exit code when php version or platform … #30780

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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