File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,9 +52,8 @@ public function preProcessIndex($value)
5252 {
5353 $ values = $ this ->preProcess ($ value );
5454
55- $ values = collect (is_array ($ values ) ? $ values : [$ values ]);
56-
57- return $ values ->map (function ($ value ) {
55+ // NOTE: Null-coalescing into `[null]` as that matches old behaviour.
56+ return collect ($ values ?? [null ])->map (function ($ value ) {
5857 return $ this ->getLabel ($ value );
5958 })->all ();
6059 }
@@ -67,9 +66,8 @@ public function preProcess($value)
6766 return [];
6867 }
6968
70- $ value = is_array ($ value ) ? $ value : [$ value ];
71-
72- $ values = collect ($ value )->map (function ($ value ) {
69+ // NOTE: Null-coalescing into `[null]` as that matches old behaviour.
70+ $ values = collect ($ value ?? [null ])->map (function ($ value ) {
7371 return $ this ->config ('cast_booleans ' ) ? $ this ->castFromBoolean ($ value ) : $ value ;
7472 });
7573
You can’t perform that action at this time.
0 commit comments