diff options
Diffstat (limited to '17.patch')
-rw-r--r-- | 17.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/17.patch b/17.patch new file mode 100644 index 0000000..d60dbef --- /dev/null +++ b/17.patch @@ -0,0 +1,23 @@ +From 84ef9af3c437cf173afe2a5f7c0f9ce1b17529d4 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Thu, 2 Nov 2017 16:18:43 +0100 +Subject: [PATCH] Fix count(): Parameter must be an array or an object that + implements Countable ... + +--- + src/JsonPatch.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/JsonPatch.php b/src/JsonPatch.php +index d180e5a..f77192c 100644 +--- a/src/JsonPatch.php ++++ b/src/JsonPatch.php +@@ -261,7 +261,7 @@ private static function is_index($part) + private static function diff_values($path, $value, $other) + { + // manually handle the {}-looks-like-[] case, when other is associative +- if ((count($value) == 0 || count($other) == 0) ++ if ((!$value || !$other) + && (self::is_associative($value) || self::is_associative($other))) + { + return self::diff_assoc($path, $value, $other); |