From 50ec6daf181dce10d1fe67ea6b7cad86cb71e0c8 Mon Sep 17 00:00:00 2001 From: Jeffrey Benusa Date: Wed, 11 Oct 2023 11:07:40 -0500 Subject: [PATCH] Added check for simple arrays for newValues within existingValues --- src/helpers/DataHelper.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/helpers/DataHelper.php b/src/helpers/DataHelper.php index 7f2a7a51..57b1ed15 100644 --- a/src/helpers/DataHelper.php +++ b/src/helpers/DataHelper.php @@ -264,6 +264,12 @@ public static function compareElementContent($content, $element) $newValue = null; } + // If array key & values are already within the existing array + if (is_array($newValue) && is_array($existingValue) && Hash::contains($existingValue,$newValue)) { + unset($trackedChanges[$key]); + continue; + } + // Check for simple fields first if (self::_compareSimpleValues($fields, $key, $existingValue, $newValue)) { unset($trackedChanges[$key]);