wintercms / wn-blocks-plugin

Block based content management plugin for Winter CMS.
MIT License
21 stars 5 forks source link

Columns for `columns_two` can't get empty #20

Closed damsfx closed 1 year ago

damsfx commented 1 year ago

I'm not really sure if this is a bug, because the columns aren't supposed to be empty, but if a columns_two block is added without any content (or one of the columns doesn't have any), then an error is thrown:

Winter\Blocks\Plugin::Winter\Blocks\{closure}(): Argument #2 ($blocks) must be of type array, null given, ... 

Maybe a fallback to an empty array is needed in this case.

LukeTowers commented 1 year ago

@damsfx I'd agree with you, can you submit a PR?