Merge pull request #17368 from tanthammar/patch-15

Fix array_reduce() error in InteractsWithToolbarButtons.php
This commit is contained in:
Dan Harrin
2025-08-18 10:52:40 +01:00
committed by GitHub
@@ -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(
@@ -60,7 +60,7 @@ trait InteractsWithToolbarButtons
}
$this->toolbarButtons = [
...$this->toolbarButtons,
...$this->toolbarButtons ?? [],
...$buttonsToEnable,
];