[Pkg-owncloud-commits] [owncloud] 32/123: Add warning to OCC as well in case another PHP version is used there

David Prévot taffit at moszumanska.debian.org
Tue May 19 23:55:10 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 4c0a8d327d176e1d9861914f0e6254e022d7637b
Author: Lukas Reschke <lukas at owncloud.com>
Date:   Fri May 8 16:01:38 2015 +0200

    Add warning to OCC as well in case another PHP version is used there
    
    In regard to a recent rant on social media where users complained about us to have broken the command line tool. Guess reading the documentation is hard…
---
 console.php | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/console.php b/console.php
index 2e55acc..781905b 100644
--- a/console.php
+++ b/console.php
@@ -28,6 +28,14 @@ use Symfony\Component\Console\Output\ConsoleOutput;
 
 define('OC_CONSOLE', 1);
 
+// Show warning if a PHP version below 5.4.0 is used, this has to happen here
+// because base.php will already use 5.4 syntax.
+if (version_compare(PHP_VERSION, '5.4.0') === -1) {
+	echo 'This version of ownCloud requires at least PHP 5.4.0'.PHP_EOL;
+	echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version.'.PHP_EOL;
+	return;
+}
+
 try {
 	require_once 'lib/base.php';
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list