whitecube / nova-flexible-content

Flexible Content & Repeater Fields for Laravel Nova
MIT License
780 stars 229 forks source link

Bug: Undefined array key "attributes" - Concerns/HasFlexible.php line 122 #441

Closed m-lotze closed 1 year ago

m-lotze commented 1 year ago

The line 122 in Concerns/HasFlexible.php creates an error when the array key attributes is not set:

$attributes = (array) $item['attributes'] ?? [];

it should be:

$attributes = (array) ($item['attributes'] ?? []);

See my pull request for a fix.

toonvandenbos commented 1 year ago

Indeed. PR merged, thanks!