Skip to content

Commit 555e67c

Browse files
authored
Remove unnecessary closure argument passed to array_first() (#1465)
1 parent a626956 commit 555e67c

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

modules/backend/controllers/Index.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,7 @@ protected function initReportContainer()
7272
protected function checkPermissionRedirect()
7373
{
7474
if (!$this->user->hasAccess('backend.access_dashboard')) {
75-
$true = function () {
76-
return true;
77-
};
78-
if ($first = array_first(BackendMenu::listMainMenuItems(), $true)) {
75+
if ($first = array_first(BackendMenu::listMainMenuItems())) {
7976
return Redirect::intended($first->url);
8077
}
8178
return Backend::redirect('backend/users/myaccount');

0 commit comments

Comments
 (0)