4892: PHP Undefined warnings: include/page_constants.inc.php issue_4891_patch
authorTJ <acontent@iam.tj>
Tue, 11 Oct 2011 09:14:35 +0000 (10:14 +0100)
committerTJ <acontent@iam.tj>
Wed, 19 Oct 2011 19:56:16 +0000 (20:56 +0100)
  index 'user_requirement'

include/page_constants.inc.php

index 141fbbe..5213a52 100644 (file)
@@ -60,9 +60,9 @@ else
        $rows = $priviledgesDAO->getPublicPrivileges();\r
 }\r
 \r
-foreach ($rows as $row)\r
-       $privs[$row['privilege_id']] = $row['user_requirement'];\r
-\r
+foreach ($rows as $row) {\r
+       $privs[$row['privilege_id']] = array_key_exists('user_requirement', $row) ? $row['user_requirement'] : NULL;\r
+}\r
 /* initialize pages accessed by public */\r
 //$_pages[TR_NAV_PUBLIC] = array('index.php' => array('parent'=>TR_NAV_PUBLIC));\r
 \r