From 5a3fc65daa292b066dac5d9869ac8fb81d80bbfd Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 12 Oct 2017 18:15:48 +0200 Subject: add upstream patch for PHP 7.2, FTBFS from Koschei --- 5efb632b7a3a2fa76cf3ee76df650f1f2317a206.patch | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 5efb632b7a3a2fa76cf3ee76df650f1f2317a206.patch (limited to '5efb632b7a3a2fa76cf3ee76df650f1f2317a206.patch') 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 +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 { -- cgit