magento2: Undefined index notice when trying to add a new user role

When I try to add a new user role in the admin I get the following notice on production mode (and developer mode too):

Notice: Undefined index: title in [...]/vendor/magento/module-integration/Helper/Data.php on line 24

Anyone knows what causes this? Or why I even am seeing notices on production mode? I thought those where suppressed?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 24 (11 by maintainers)

Most upvoted comments

Wouldn’t it be a good idea to add some sort of check for this? Could save a lot of headaches. For example, add the following to Magento\Integration\Helper\Data in the foreach-loop:

if (!isset($resource['title'])) {
    throw new \Exception("Title not set for resource {$resource['id']}");
}

This would save a lot of people a lot of frustration.