diff --git a/src/Repositories/Behaviors/HandleFieldsGroups.php b/src/Repositories/Behaviors/HandleFieldsGroups.php index c35ff27ff..f2f1f7d6c 100644 --- a/src/Repositories/Behaviors/HandleFieldsGroups.php +++ b/src/Repositories/Behaviors/HandleFieldsGroups.php @@ -119,7 +119,7 @@ protected function handleFieldsGroups($fields) $fields[$group] = null; } - Arr::forget($fields, $groupFields); + $fields = array_filter($fields, fn($key) => !in_array($key, $groupFields), ARRAY_FILTER_USE_KEY); } return $fields;