diff options
author | Remi Collet <remi@remirepo.net> | 2018-06-05 15:44:57 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2018-06-05 15:44:57 +0200 |
commit | db1f442de5fc36ec7e77023664c3f9d38264a6f9 (patch) | |
tree | cf694c7f1c880f3f75ff9f4ce209e8e1b9810930 /1006.patch | |
parent | 0c4a2a18b84de875791289d8cd049e3af2fc7ea2 (diff) |
use range dependencies on F27+
ignore 1 test failing with sabre/http 4.2.4
fix project URL
Diffstat (limited to '1006.patch')
-rw-r--r-- | 1006.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/1006.patch b/1006.patch new file mode 100644 index 0000000..b20ebb0 --- /dev/null +++ b/1006.patch @@ -0,0 +1,68 @@ +From 89914212677c23e680a9de57b56801062aed0f3f Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Fri, 6 Oct 2017 15:51:42 +0200 +Subject: [PATCH] fix "count(): Parameter must be an array or an object that + implements Countable" (7.2) + +--- + lib/DAVACL/Plugin.php | 2 +- + tests/Sabre/CalDAV/ICSExportPluginTest.php | 12 ++++++------ + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/lib/DAVACL/Plugin.php b/lib/DAVACL/Plugin.php +index a2aa118d70..a5c8ac5c20 100644 +--- a/lib/DAVACL/Plugin.php ++++ b/lib/DAVACL/Plugin.php +@@ -1400,7 +1400,7 @@ protected function expandProperties($path, array $requestedProperties, $depth) { + foreach ($requestedProperties as $propertyName => $childRequestedProperties) { + + // We're only traversing if sub-properties were requested +- if (count($childRequestedProperties) === 0) continue; ++ if (!is_array($childRequestedProperties) || count($childRequestedProperties) === 0) continue; + + // We only have to do the expansion if the property was found + // and it contains an href element. +diff --git a/tests/Sabre/CalDAV/ICSExportPluginTest.php b/tests/Sabre/CalDAV/ICSExportPluginTest.php +index 75412577e9..1df0dfac58 100644 +--- a/tests/Sabre/CalDAV/ICSExportPluginTest.php ++++ b/tests/Sabre/CalDAV/ICSExportPluginTest.php +@@ -212,8 +212,8 @@ function testFilterStartEnd() { + + $obj = VObject\Reader::read($response->getBody()); + +- $this->assertEquals(0, count($obj->VTIMEZONE)); +- $this->assertEquals(0, count($obj->VEVENT)); ++ $this->assertNull($obj->VTIMEZONE); ++ $this->assertNull($obj->VEVENT); + + } + +@@ -237,7 +237,7 @@ function testExpand() { + + $obj = VObject\Reader::read($response->getBody()); + +- $this->assertEquals(0, count($obj->VTIMEZONE)); ++ $this->assertNull($obj->VTIMEZONE); + $this->assertEquals(1, count($obj->VEVENT)); + + } +@@ -292,7 +292,7 @@ function testFilterComponentVEVENT() { + $obj = VObject\Reader::read($response->body); + $this->assertEquals(1, count($obj->VTIMEZONE)); + $this->assertEquals(1, count($obj->VEVENT)); +- $this->assertEquals(0, count($obj->VTODO)); ++ $this->assertNull($obj->VTODO); + + } + +@@ -307,8 +307,8 @@ function testFilterComponentVTODO() { + + $obj = VObject\Reader::read($response->body); + +- $this->assertEquals(0, count($obj->VTIMEZONE)); +- $this->assertEquals(0, count($obj->VEVENT)); ++ $this->assertNull($obj->VTIMEZONE); ++ $this->assertNull($obj->VEVENT); + $this->assertEquals(1, count($obj->VTODO)); + + } |