From c73eb6cb6145503344c7b23973d593b508915023 Mon Sep 17 00:00:00 2001 From: TinaH Date: Mon, 18 Aug 2025 11:46:58 +0200 Subject: [PATCH 1/2] Update InteractsWithToolbarButtons.php $toolbarButtons is initial `null`, that throws an error on array_reduce(). Adding `$this->toolbarButtons ?? []`on line 34 solves the issue. --- .../src/Components/Concerns/InteractsWithToolbarButtons.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/forms/src/Components/Concerns/InteractsWithToolbarButtons.php b/packages/forms/src/Components/Concerns/InteractsWithToolbarButtons.php index cd348cdaba..54dfce89b9 100644 --- a/packages/forms/src/Components/Concerns/InteractsWithToolbarButtons.php +++ b/packages/forms/src/Components/Concerns/InteractsWithToolbarButtons.php @@ -31,7 +31,7 @@ trait InteractsWithToolbarButtons } $this->toolbarButtons = array_reduce( - $this->toolbarButtons, + $this->toolbarButtons ?? [], function ($carry, $button) use ($buttonsToDisable) { if (is_array($button)) { $carry[] = array_values(array_filter( From a2945f1b2ea0e6e50a881e8a582a3b6b8e3578a8 Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Mon, 18 Aug 2025 10:52:18 +0100 Subject: [PATCH 2/2] Update InteractsWithToolbarButtons.php --- .../src/Components/Concerns/InteractsWithToolbarButtons.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/forms/src/Components/Concerns/InteractsWithToolbarButtons.php b/packages/forms/src/Components/Concerns/InteractsWithToolbarButtons.php index 54dfce89b9..1bdad1b80c 100644 --- a/packages/forms/src/Components/Concerns/InteractsWithToolbarButtons.php +++ b/packages/forms/src/Components/Concerns/InteractsWithToolbarButtons.php @@ -60,7 +60,7 @@ trait InteractsWithToolbarButtons } $this->toolbarButtons = [ - ...$this->toolbarButtons, + ...$this->toolbarButtons ?? [], ...$buttonsToEnable, ];