From 6326b6b63120aea849ef62c4c6bbb43f1341a1e2 Mon Sep 17 00:00:00 2001 From: mrgoldy Date: Thu, 9 Apr 2020 21:23:22 +0200 Subject: [PATCH] [ticket/16430] Ensure permissions are defined PHPBB3-16430 --- phpBB/includes/acp/auth.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php index a34831bb54..451646bbf1 100644 --- a/phpBB/includes/acp/auth.php +++ b/phpBB/includes/acp/auth.php @@ -1136,13 +1136,10 @@ class auth_admin extends \phpbb\auth\auth $order = array_flip(array_keys($phpbb_permissions->get_permissions())); + $category_array = array_filter($category_array, [$phpbb_permissions, 'permission_defined'], ARRAY_FILTER_USE_KEY); + foreach ($category_array as $cat => $cat_array) { - if (!$phpbb_permissions->category_defined($cat)) - { - continue; - } - $template->assign_block_vars($tpl_cat, array( 'S_YES' => ($cat_array['S_YES'] && !$cat_array['S_NEVER'] && !$cat_array['S_NO']) ? true : false, 'S_NEVER' => ($cat_array['S_NEVER'] && !$cat_array['S_YES'] && !$cat_array['S_NO']) ? true : false,