diff --git a/src/Provider/Doctrine/Auditing/Transaction/AuditTrait.php b/src/Provider/Doctrine/Auditing/Transaction/AuditTrait.php index b1aa624..5c5b7e4 100644 --- a/src/Provider/Doctrine/Auditing/Transaction/AuditTrait.php +++ b/src/Provider/Doctrine/Auditing/Transaction/AuditTrait.php @@ -202,7 +202,10 @@ private function diff(EntityManagerInterface $entityManager, object $entity, arr } if ($o !== $n) { - if (isset($type) && Type::getType(Types::JSON) === $type) { + if ( + isset($type) && Type::getType(Types::JSON) === $type + && (null === $o || \is_array($o)) && (null === $n || \is_array($n)) + ) { /** * @var ?array $o * @var ?array $n