Skip to content

Commit eaa3636

Browse files
committed
Fix access notice
1 parent b8ef902 commit eaa3636

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DashboardPanelShortcuts.module

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class DashboardPanelShortcuts extends DashboardPanel
109109
}
110110
}
111111

112-
if ($page && $this->isPageViewable($page)) {
112+
if (is_object($page) && $this->isPageViewable($page)) {
113113
$info = $this->getPageInfo($page);
114114
$title = $title ?? (is_string($key) ? $key : $info->title);
115115
$summary = $summary ?? $info->summary;
@@ -223,7 +223,7 @@ class DashboardPanelShortcuts extends DashboardPanel
223223

224224
protected function isPageViewable($page)
225225
{
226-
if (!$page || !$page->url) {
226+
if (!($page->url ?? null)) {
227227
return false;
228228
}
229229
if (!$this->checkAccess) {

0 commit comments

Comments
 (0)