From a7b006599bbf9828a09dafc9ca94e8b60d325f25 Mon Sep 17 00:00:00 2001 From: Arthur Perton Date: Fri, 19 Feb 2021 16:25:16 +0100 Subject: [PATCH 1/2] Preserve numeric keys in the Array fieldtype --- src/Fieldtypes/Arr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Fieldtypes/Arr.php b/src/Fieldtypes/Arr.php index 582a55a427..67fe47f682 100644 --- a/src/Fieldtypes/Arr.php +++ b/src/Fieldtypes/Arr.php @@ -36,7 +36,7 @@ protected function configFieldItems(): array public function preProcess($data) { - return array_merge($this->blankKeyed(), $data ?? []); + return array_replace($this->blankKeyed(), $data ?? []); } public function preProcessConfig($data) From 342e5fd241f230462c0353edbaa60bd0540e054c Mon Sep 17 00:00:00 2001 From: Arthur Perton Date: Fri, 19 Feb 2021 18:40:19 +0100 Subject: [PATCH 2/2] Trigger checks