disableToolbarButtons() fails when toolbarButtons is null in RichEditor
I’m running into an issue with RichEditor when using disableToolbarButtons() without defining any toolbarButtons.
If no default buttons are set,
This happens in the InteractsWithToolbarButtons trait (line 33).
To Reproduce
Anyone else having the same issue?
If no default buttons are set,
$this->toolbarButtons is null, and disableToolbarButtons() calls array_reduce() on it, which throws:array_reduce(): Argument #1 ($array) must be of type array, null given
This happens in the InteractsWithToolbarButtons trait (line 33).
To Reproduce
- Create a RichEditor field without defining toolbarButtons.
- Call disableToolbarButtons() on it.
Anyone else having the same issue?