[Pkg-owncloud-commits] [php-sabredav] 04/14: PHP 7 is going to change operator precedence.
David Prévot
taffit at moszumanska.debian.org
Tue Jan 26 16:19:37 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch 2.1
in repository php-sabredav.
commit c2e3f2f093c6942c5d90bfadf1a13c06465a3361
Author: Evert Pot <me at evertpot.com>
Date: Sun Jul 19 13:45:57 2015 -0400
PHP 7 is going to change operator precedence.
---
lib/CalDAV/CalendarQueryValidator.php | 12 ++++++------
tests/Sabre/DAV/ClientTest.php | 8 ++++++++
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/lib/CalDAV/CalendarQueryValidator.php b/lib/CalDAV/CalendarQueryValidator.php
index 8d5eb5f..202d38d 100644
--- a/lib/CalDAV/CalendarQueryValidator.php
+++ b/lib/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 6ca88b3..9184f05 100644
--- a/tests/Sabre/DAV/ClientTest.php
+++ b/tests/Sabre/DAV/ClientTest.php
@@ -9,6 +9,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(
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list