- Issue created by @laura.j.johnson@gmail.com
- Status changed to Needs review
about 2 years ago 3:36pm 8 March 2023 - Status changed to Fixed
about 2 years ago 10:38pm 14 March 2023 Automatically closed - issue fixed for 2 weeks with no activity.
Warning: Undefined array key "" in Drupal\user\PermissionHandler->Drupal\user\{closure}() (line 215 of /code/core/modules/user/src/PermissionHandler.php)
#0 /code/core/includes/bootstrap.inc(347): _drupal_error_handler_real(2, 'Undefined array...', '/code/core/modu...', 215)
#1 /code/core/modules/user/src/PermissionHandler.php(215): _drupal_error_handler(2, 'Undefined array...', '/code/core/modu...', 215)
#2 [internal function]: Drupal\user\PermissionHandler->Drupal\user\{closure}(Array, Array)
#3 /code/core/modules/user/src/PermissionHandler.php(217): uasort(Array, Object(Closure))
#4 /code/core/modules/user/src/PermissionHandler.php(114): Drupal\user\PermissionHandler->sortPermissions(Array)
#5 /code/modules/contrib/roleassign/roleassign.module(18): Drupal\user\PermissionHandler->getPermissions()
#6 /code/core/modules/help/src/Plugin/Block/HelpBlock.php(97): roleassign_help('entity.node.edi...', Object(Drupal\Core\Routing\CurrentRouteMatch))
#7 /code/core/lib/Drupal/Core/Extension/ModuleHandler.php(405): Drupal\help\Plugin\Block\HelpBlock->Drupal\help\Plugin\Block\{closure}(Object(Closure), 'roleassign')
#8 /code/core/modules/help/src/Plugin/Block/HelpBlock.php(102): Drupal\Core\Extension\ModuleHandler->invokeAllWith('help', Object(Closure))
#9 /code/core/modules/block/src/BlockViewBuilder.php(171): Drupal\help\Plugin\Block\HelpBlock->build()
#10 [internal function]: Drupal\block\BlockViewBuilder::preRender(Array)
Visit a page the contains the core help block as a non super-user. Check the logs for the above warning.
I'm not sure why \Drupal::service('user.permissions')->getPermissions()
is causing the warning. But regardless, we don't need for it to be called on every page that the help block is on if it's only used on one route.
Fixed
1.0
Code
Automatically closed - issue fixed for 2 weeks with no activity.