Skip to content

Commit d6ac9a5

Browse files
committed
PHP 7.2 fix: Considering count returns 1 on empty StdClass object
1 parent 74ff7a5 commit d6ac9a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Common/JsonSchema/JsonPatch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ protected function handleObject(\stdClass $srcStruct, \stdClass $desStruct, stri
7878

7979
protected function shouldPartiallyReplace(\stdClass $o1, \stdClass $o2): bool
8080
{
81-
return count(array_diff_key((array) $o1, (array) $o2)) < count((array) $o1);
81+
return count(array_diff_key((array) $o1, (array) $o2)) <= count((array) $o1);
8282
}
8383

8484
protected function arrayDiff(array $a1, array $a2): array

0 commit comments

Comments
 (0)