Skip to content

Commit

Permalink
Merge pull request #307 from FriendsOfCake/button-check
Browse files Browse the repository at this point in the history
Check if action is mapped before trying to access it's config.
  • Loading branch information
ADmad committed Dec 23, 2022
2 parents 0e993e5 + da917d2 commit 4361c86
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Listener/Traits/FormTypeTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ protected function _getDefaultExtraLeftButtons(): array
$blacklist = $action->getConfig('scaffold.actions_blacklist', []);
if (
!in_array('delete', $blacklist, true) &&
$this->_crud()->isActionMapped('delete') &&
$this->_crud()->action('delete')->enabled()
) {
$buttons[] = [
Expand Down

0 comments on commit 4361c86

Please sign in to comment.