[Pkg-owncloud-commits] [owncloud] 33/223: Fixed array_combine for PHP 5.3

David Prévot taffit at moszumanska.debian.org
Sun Jun 22 01:54:02 UTC 2014


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

taffit pushed a commit to branch master
in repository owncloud.

commit 4e4c2b04c8a39b9d069acd38bf3654942ee0126d
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Wed Jun 11 19:13:49 2014 +0200

    Fixed array_combine for PHP 5.3
---
 lib/private/appframework/utility/controllermethodreflector.php | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lib/private/appframework/utility/controllermethodreflector.php b/lib/private/appframework/utility/controllermethodreflector.php
index a1519c7..d5cf2f5 100644
--- a/lib/private/appframework/utility/controllermethodreflector.php
+++ b/lib/private/appframework/utility/controllermethodreflector.php
@@ -55,8 +55,13 @@ class ControllerMethodReflector {
 
 		// extract type parameter information
 		preg_match_all('/@param (?<type>\w+) \$(?<var>\w+)/', $docs, $matches);
-		$this->types = array_combine($matches['var'], $matches['type']);
-
+		// this is just a fix for PHP 5.3 (array_combine raises warning if called with
+		// two empty arrays
+		if($matches['var'] === array() && $matches['type'] === array()) {
+			$this->types = array();
+		} else {
+			$this->types = array_combine($matches['var'], $matches['type']);
+		}
 		// get method parameters
 		foreach ($reflection->getParameters() as $param) {
 			if($param->isOptional()) {

-- 
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