You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's an issue with Encore\Admin\Form\Field->value method.
Because it checks only for $this->value to not be equal to null (using null coalescing operator -- return $this->value ?? $this->getDefault();).
Hence it does not get to the getDefault method if $this->value is something else from null.
For example Encore\Admin\Form\Field\Map field has value set to an array with empty values:
Description:
There's an issue with
Encore\Admin\Form\Field->value
method.Because it checks only for
$this->value
to not be equal to null (using null coalescing operator --return $this->value ?? $this->getDefault();
).Hence it does not get to the
getDefault
method if$this->value
is something else from null.For example
Encore\Admin\Form\Field\Map
field has value set to an array with empty values:Not sure whether it should be fixed explicitly for
Map
field or forField
alltogether.Described it some more in this comment -- there're some workarounds also.
Steps To Reproduce:
$form->map('lat', 'lng', __('Location'));
.default
methodThe text was updated successfully, but these errors were encountered: