From 1486b1009d921f7e8d367c5493cb5d714e3ea009 Mon Sep 17 00:00:00 2001 From: Arthur Perton Date: Mon, 22 Feb 2021 03:44:51 +0100 Subject: [PATCH] Preserve numeric keys in the Array fieldtype (#3284) --- 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)