summaryrefslogtreecommitdiffstats
path: root/5efb632b7a3a2fa76cf3ee76df650f1f2317a206.patch
diff options
context:
space:
mode:
Diffstat (limited to '5efb632b7a3a2fa76cf3ee76df650f1f2317a206.patch')
-rw-r--r--5efb632b7a3a2fa76cf3ee76df650f1f2317a206.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/5efb632b7a3a2fa76cf3ee76df650f1f2317a206.patch b/5efb632b7a3a2fa76cf3ee76df650f1f2317a206.patch
new file mode 100644
index 0000000..e85fe56
--- /dev/null
+++ b/5efb632b7a3a2fa76cf3ee76df650f1f2317a206.patch
@@ -0,0 +1,26 @@
+From 5efb632b7a3a2fa76cf3ee76df650f1f2317a206 Mon Sep 17 00:00:00 2001
+From: Jan Schneider <jan@horde.org>
+Date: Fri, 25 Nov 2016 09:40:34 +0100
+Subject: [PATCH] Fix count() usage.
+
+Detected by PHP 7.2. count() should only be passed arrays and Countables.
+---
+ lib/Horde/Kolab/Server/Ldap/Changes.php | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/lib/Horde/Kolab/Server/Ldap/Changes.php b/lib/Horde/Kolab/Server/Ldap/Changes.php
+index 84a6ea0..348631f 100644
+--- a/lib/Horde/Kolab/Server/Ldap/Changes.php
++++ b/lib/Horde/Kolab/Server/Ldap/Changes.php
+@@ -77,9 +77,8 @@ public function getChangeset()
+ $cs['delete'][] = $attribute;
+ continue;
+ }
+- if (count($new[$attribute]) == 1
+- && count($old[$attribute]) == 1
+- ) {
++ if ((!is_array($new[$attribute]) || count($new[$attribute]) == 1) &&
++ (!is_array($old[$attribute]) || count($old[$attribute]) == 1)) {
+ if ($new[$attribute][0] == $old[$attribute][0]) {
+ continue;
+ } else {