[Pkg-owncloud-commits] [php-sabredav] 02/07: Cherry-pick "PHP 7 is going to change operator precedence"

Mathieu Parent sathieu at moszumanska.debian.org
Fri May 6 13:39:31 UTC 2016


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

sathieu pushed a commit to branch 1.8-php5
in repository php-sabredav.

commit 3073b7c58520aa453d07739919fd7edab9170e46
Author: Mathieu Parent <math.parent at gmail.com>
Date:   Fri May 6 15:04:18 2016 +0200

    Cherry-pick "PHP 7 is going to change operator precedence"
---
 ...-7-is-going-to-change-operator-precedence.patch | 90 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 91 insertions(+)

diff --git a/debian/patches/0005-PHP-7-is-going-to-change-operator-precedence.patch b/debian/patches/0005-PHP-7-is-going-to-change-operator-precedence.patch
new file mode 100644
index 0000000..61a8bbf
--- /dev/null
+++ b/debian/patches/0005-PHP-7-is-going-to-change-operator-precedence.patch
@@ -0,0 +1,90 @@
+From: Evert Pot <me at evertpot.com>
+Date: Sun, 19 Jul 2015 13:45:57 -0400
+Subject: PHP 7 is going to change operator precedence.
+
+(cherry picked from commit c9f3e7d2be11872eb36873c5410bac476d815871)
+---
+ lib/Sabre/CalDAV/CalendarQueryValidator.php | 12 ++++++------
+ tests/Sabre/DAV/ClientTest.php              |  8 ++++++++
+ 2 files changed, 14 insertions(+), 6 deletions(-)
+
+diff --git a/lib/Sabre/CalDAV/CalendarQueryValidator.php b/lib/Sabre/CalDAV/CalendarQueryValidator.php
+index c9cb463..cf36b50 100644
+--- a/lib/Sabre/CalDAV/CalendarQueryValidator.php
++++ b/lib/Sabre/CalDAV/CalendarQueryValidator.php
+@@ -59,7 +59,7 @@ class CalendarQueryValidator {
+ 
+         foreach($filters as $filter) {
+ 
+-            $isDefined = isset($parent->$filter['name']);
++            $isDefined = isset($parent->{$filter['name']});
+ 
+             if ($filter['is-not-defined']) {
+ 
+@@ -75,7 +75,7 @@ class CalendarQueryValidator {
+             }
+ 
+             if ($filter['time-range']) {
+-                foreach($parent->$filter['name'] as $subComponent) {
++                foreach ($parent->{$filter['name']} as $subComponent) {
+                     if ($this->validateTimeRange($subComponent, $filter['time-range']['start'], $filter['time-range']['end'])) {
+                         continue 2;
+                     }
+@@ -89,7 +89,7 @@ class CalendarQueryValidator {
+ 
+             // If there are sub-filters, we need to find at least one component
+             // for which the subfilters hold true.
+-            foreach($parent->$filter['name'] as $subComponent) {
++            foreach ($parent->{$filter['name']} as $subComponent) {
+ 
+                 if (
+                     $this->validateCompFilters($subComponent, $filter['comp-filters']) &&
+@@ -128,7 +128,7 @@ class CalendarQueryValidator {
+ 
+         foreach($filters as $filter) {
+ 
+-            $isDefined = isset($parent->$filter['name']);
++            $isDefined = isset($parent->{$filter['name']});
+ 
+             if ($filter['is-not-defined']) {
+ 
+@@ -144,7 +144,7 @@ class CalendarQueryValidator {
+             }
+ 
+             if ($filter['time-range']) {
+-                foreach($parent->$filter['name'] as $subComponent) {
++                foreach ($parent->{$filter['name']} as $subComponent) {
+                     if ($this->validateTimeRange($subComponent, $filter['time-range']['start'], $filter['time-range']['end'])) {
+                         continue 2;
+                     }
+@@ -158,7 +158,7 @@ class CalendarQueryValidator {
+ 
+             // If there are sub-filters, we need to find at least one property
+             // for which the subfilters hold true.
+-            foreach($parent->$filter['name'] as $subComponent) {
++            foreach ($parent->{$filter['name']} as $subComponent) {
+ 
+                 if(
+                     $this->validateParamFilters($subComponent, $filter['param-filters']) &&
+diff --git a/tests/Sabre/DAV/ClientTest.php b/tests/Sabre/DAV/ClientTest.php
+index ca67d35..1e8e244 100644
+--- a/tests/Sabre/DAV/ClientTest.php
++++ b/tests/Sabre/DAV/ClientTest.php
+@@ -6,6 +6,14 @@ require_once 'Sabre/DAV/ClientMock.php';
+ 
+ class ClientTest extends \PHPUnit_Framework_TestCase {
+ 
++    function setUp() {
++
++        if (!function_exists('curl_init')) {
++            $this->markTestSkipped('CURL must be installed to test the client');
++        }
++
++    }
++
+     function testConstruct() {
+ 
+         $client = new ClientMock(array(
+-- 
+2.8.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 91147e3..ee42a7d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
 0002-Install-sabredav.php-in-usr-share-php-Sabre.patch
 0003-tfix-threshold.patch
 0004-tfix-selection.patch
+0005-PHP-7-is-going-to-change-operator-precedence.patch

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



More information about the Pkg-owncloud-commits mailing list