Skip to content

Commit 4361c86

Browse files
authored
Merge pull request #307 from FriendsOfCake/button-check
Check if action is mapped before trying to access it's config.
2 parents 0e993e5 + da917d2 commit 4361c86

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Listener/Traits/FormTypeTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ protected function _getDefaultExtraLeftButtons(): array
135135
$blacklist = $action->getConfig('scaffold.actions_blacklist', []);
136136
if (
137137
!in_array('delete', $blacklist, true) &&
138+
$this->_crud()->isActionMapped('delete') &&
138139
$this->_crud()->action('delete')->enabled()
139140
) {
140141
$buttons[] = [

0 commit comments

Comments
 (0)