diff options
author | Remi Collet <remi@remirepo.net> | 2017-11-02 16:27:01 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2017-11-02 16:27:01 +0100 |
commit | 65ab0fa253b4c1ba454a4d36847ef923ba08c08f (patch) | |
tree | ce34dc4bb4753ef261493aeb6214c292b2287f8f /17.patch | |
parent | b917f662e60e92c010ba312891625cb09c0f1d7c (diff) |
fix FTBFS from Koschei, add patch for PHP 7.2 from https://github.com/mikemccabe/json-patch-php/pull/17HEADmaster
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); |