From 589dc8f71d5d444b1c7933d1b65af71bfae018d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sylvain=20Jul=C3=A9?= Date: Mon, 8 Jun 2020 23:24:22 +0200 Subject: [PATCH] Check if 'nav' key exists before accessing it --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 0da3b2a..9c15ea5 100644 --- a/index.php +++ b/index.php @@ -22,7 +22,7 @@ if($currentRole == $role) { $fieldname = $options['fieldname']; $pages = $currentUser->$fieldname()->toPages(); - $nav = $options['nav'] ? $options['nav'] : false; + $nav = array_key_exists('nav', $options) && $options['nav'] ? $options['nav'] : false; if($pages->count()) { foreach($pages as $page) {