summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-07-21 12:38:35 +0200
committerGitHub <noreply@github.com>2017-07-21 12:38:34 +0200
commit4165d5bca62bf55fcab6842bf738b21746a62027 (patch)
tree744ba9355215b7976ff17c81d7d5d4f3b1ce35cf
parentd338869257b167c9d047aa7f48936acdb54b6ed0 (diff)
parent091cba8374a76048182bec56923ffc79401e8d14 (diff)
downloadnextcloud-server-4165d5bca62bf55fcab6842bf738b21746a62027.tar.gz
nextcloud-server-4165d5bca62bf55fcab6842bf738b21746a62027.zip
Merge pull request #5792 from nextcloud/stable12-prevent-php7.2-usage
[stable12] Show warning if PHP 7.2 is used
-rw-r--r--console.php8
-rw-r--r--index.php8
2 files changed, 16 insertions, 0 deletions
diff --git a/console.php b/console.php
index 47cc2edf018..517032c2665 100644
--- a/console.php
+++ b/console.php
@@ -39,6 +39,14 @@ if (version_compare(PHP_VERSION, '5.6.0') === -1) {
return;
}
+// Show warning if PHP 7.2 is used as Nextcloud is not compatible with PHP 7.2 for now
+// @see https://github.com/nextcloud/server/pull/5791
+if (version_compare(PHP_VERSION, '7.2.0') !== -1) {
+ echo 'This version of Nextcloud is not compatible with PHP 7.2.<br/>';
+ echo 'You are currently running ' . PHP_VERSION . '.';
+ return;
+}
+
function exceptionHandler($exception) {
echo "An unhandled exception has been thrown:" . PHP_EOL;
echo $exception;
diff --git a/index.php b/index.php
index cd95b0c7965..686b48aaff1 100644
--- a/index.php
+++ b/index.php
@@ -33,6 +33,14 @@ if (version_compare(PHP_VERSION, '5.6.0') === -1) {
return;
}
+// Show warning if PHP 7.2 is used as Nextcloud is not compatible with PHP 7.2 for now
+// @see https://github.com/nextcloud/server/pull/5791
+if (version_compare(PHP_VERSION, '7.2.0') !== -1) {
+ echo 'This version of Nextcloud is not compatible with PHP 7.2.<br/>';
+ echo 'You are currently running ' . PHP_VERSION . '.';
+ return;
+}
+
try {
require_once __DIR__ . '/lib/base.php';