From b258f1dce2a1f6bc9fb4d4711d89836440aeae0f Mon Sep 17 00:00:00 2001 From: TJ Date: Tue, 11 Oct 2011 10:14:35 +0100 Subject: [PATCH] 4892: PHP Undefined warnings: include/page_constants.inc.php index 'user_requirement' --- include/page_constants.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/page_constants.inc.php b/include/page_constants.inc.php index 141fbbe..5213a52 100644 --- a/include/page_constants.inc.php +++ b/include/page_constants.inc.php @@ -60,9 +60,9 @@ else $rows = $priviledgesDAO->getPublicPrivileges(); } -foreach ($rows as $row) - $privs[$row['privilege_id']] = $row['user_requirement']; - +foreach ($rows as $row) { + $privs[$row['privilege_id']] = array_key_exists('user_requirement', $row) ? $row['user_requirement'] : NULL; +} /* initialize pages accessed by public */ //$_pages[TR_NAV_PUBLIC] = array('index.php' => array('parent'=>TR_NAV_PUBLIC)); -- 2.17.1