Code Duplication    Length = 5-6 lines in 2 locations

index.php 1 location

@@ 32-36 (lines=5) @@
29
30
// Show warning if PHP 7.2 is used as Nextcloud is not compatible with PHP 7.2 for now
31
// @see https://github.com/nextcloud/server/pull/5791
32
if (version_compare(PHP_VERSION, '7.2.0') !== -1) {
33
	echo 'This version of Nextcloud is not compatible with PHP 7.2.<br/>';
34
	echo 'You are currently running ' . PHP_VERSION . '.';
35
	return;
36
}
37
38
try {
39

lib/versioncheck.php 1 location

@@ 13-18 (lines=6) @@
10
}
11
12
// Show warning if > PHP 7.1 is used as Nextcloud 12 is not compatible with > PHP 7.1
13
if (version_compare(PHP_VERSION, '7.2.0', '>=')) {
14
	http_response_code(500);
15
	echo 'This version of Nextcloud is not compatible with > PHP 7.2.<br/>';
16
	echo 'You are currently running ' . PHP_VERSION . '.';
17
	exit(-1);
18
}
19