From 7986851a44a835f8d65f1ca9ca5f8e8e48e8a4ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Mon, 5 Mar 2018 20:22:36 +0100 Subject: [PATCH] [stable10] Properly use error exit code when php version or platform is not supported --- console.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/console.php b/console.php index 7c1c317ce5a6..b9229d381bdd 100644 --- a/console.php +++ b/console.php @@ -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) {