File tree Expand file tree Collapse file tree 9 files changed +31
-29
lines changed
Expand file tree Collapse file tree 9 files changed +31
-29
lines changed Original file line number Diff line number Diff line change 2525 *
2626 */
2727
28+ require_once __DIR__ . '/lib/versioncheck.php ' ;
29+
2830use OC \Console \Application ;
2931use Symfony \Component \Console \Input \ArgvInput ;
3032use Symfony \Component \Console \Output \ConsoleOutput ;
3133
3234define ('OC_CONSOLE ' , 1 );
3335
34- // Show warning if a PHP version below 5.6.0 is used, this has to happen here
35- // because base.php will already use 5.6 syntax.
36- if (version_compare (PHP_VERSION , '5.6.0 ' ) === -1 ) {
37- echo 'This version of Nextcloud requires at least PHP 5.6.0 ' .PHP_EOL ;
38- echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version. ' .PHP_EOL ;
39- return ;
40- }
41-
42- // Show warning if PHP 7.2 is used as Nextcloud is not compatible with PHP 7.2 for now
43- // @see https://github.com/nextcloud/server/pull/5791
44- if (version_compare (PHP_VERSION , '7.2.0 ' ) !== -1 ) {
45- echo 'This version of Nextcloud is not compatible with PHP 7.2.<br/> ' ;
46- echo 'You are currently running ' . PHP_VERSION . '. ' ;
47- return ;
48- }
49-
5036function exceptionHandler ($ exception ) {
5137 echo "An unhandled exception has been thrown: " . PHP_EOL ;
5238 echo $ exception ;
Original file line number Diff line number Diff line change 3030 *
3131 */
3232
33- // Show warning if a PHP version below 5.6.0 is used
34- if (version_compare (PHP_VERSION , '5.6.0 ' ) === -1 ) {
35- echo 'This version of Nextcloud requires at least PHP 5.6.0<br/> ' ;
36- echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version. ' ;
37- return ;
38- }
33+ require_once __DIR__ . '/lib/versioncheck.php ' ;
3934
4035try {
4136
Original file line number Diff line number Diff line change 2525 *
2626 */
2727
28- // Show warning if a PHP version below 5.6.0 is used, this has to happen here
29- // because base.php will already use 5.6 syntax.
30- if (version_compare (PHP_VERSION , '5.6.0 ' ) === -1 ) {
31- echo 'This version of Nextcloud requires at least PHP 5.6.0<br/> ' ;
32- echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version. ' ;
33- return ;
34- }
28+ require_once __DIR__ . '/lib/versioncheck.php ' ;
3529
3630// Show warning if PHP 7.2 is used as Nextcloud is not compatible with PHP 7.2 for now
3731// @see https://github.com/nextcloud/server/pull/5791
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ // Show warning if a PHP version below 5.6.0 is used, this has to happen here
4+ // because base.php will already use 5.6 syntax.
5+ if (version_compare (PHP_VERSION , '5.6.0 ' . '< ' )) {
6+ http_response_code (500 );
7+ echo 'This version of Nextcloud requires at least PHP 5.6.0<br/> ' ;
8+ echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version. ' ;
9+ exit (-1 );
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+ }
Original file line number Diff line number Diff line change 2323 *
2424 */
2525
26+ require_once __DIR__ . '/../lib/versioncheck.php ' ;
2627require_once __DIR__ . '/../lib/base.php ' ;
2728
2829header ('Content-type: application/xml ' );
Original file line number Diff line number Diff line change 2929 *
3030 */
3131
32+ require_once __DIR__ . '/../lib/versioncheck.php ' ;
3233require_once __DIR__ . '/../lib/base.php ' ;
3334
3435if (\OCP \Util::needUpgrade ()
Original file line number Diff line number Diff line change 2727 * along with this program. If not, see <http://www.gnu.org/licenses/>
2828 *
2929 */
30+
31+ require_once __DIR__ . '/lib/versioncheck.php ' ;
32+
3033try {
3134
3235 require_once __DIR__ . '/lib/base.php ' ;
Original file line number Diff line number Diff line change 2828 *
2929 */
3030
31+ require_once __DIR__ . '/lib/versioncheck.php ' ;
32+
3133use OCA \DAV \Connector \Sabre \ExceptionLoggerPlugin ;
3234use Sabre \DAV \Exception \ServiceUnavailable ;
3335use Sabre \DAV \Server ;
Original file line number Diff line number Diff line change 2727 *
2828 */
2929
30+ require_once __DIR__ . '/lib/versioncheck.php ' ;
31+
3032try {
3133
3234 require_once __DIR__ . '/lib/base.php ' ;
You can’t perform that action at this time.
0 commit comments