Problem/Motivation

Just unused variable found in \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess

...
    160     if ($admin_permission = $this->entityType->getAdminPermission()) {
    161       return AccessResult::allowedIfHasPermission($account, $this->entityType->getAdminPermission());
    162     }
...

Proposed resolution

Make use of this variable as follows:

...
    160     if ($admin_permission = $this->entityType->getAdminPermission()) {
    161       return AccessResult::allowedIfHasPermission($account, $admin_permission);
    162     }
...

Remaining tasks

Just review.

CommentFileSizeAuthor
#2 2931339-2.patch772 bytesmanuel.adan

Comments

manuel.adan created an issue. See original summary.

manuel.adan’s picture

Assigned: manuel.adan » Unassigned
Status: Active » Needs review
StatusFileSize
new772 bytes

Status: Needs review » Needs work

The last submitted patch, 2: 2931339-2.patch, failed testing. View results

ivan berezhnov’s picture

Issue tags: +CSKyiv18
snehi’s picture

Status: Needs work » Needs review

Test are passing for this issue, moving it from needs work to needs review again.

tstoeckler’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, thanks! This is not a functional change, just cleanup, so this cannot be tested.

  • catch committed 6ac6325 on 8.5.x
    Issue #2931339 by manuel.adan: Unused variable $admin_permission in...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed 6ac6325 and pushed to 8.5.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.