I haven't been able to force a rebuild of the admin_menu using a user who doesn't have the permission to switch users, but I'm seeing occasional log entries with

Invalid argument supplied for foreach()

pointing there.

The attached patch should fix this for 6.x-3.x. It has already been fixed for other branches.

Comments

sun’s picture

Status: Active » Needs work

We should backport the code from HEAD instead. module_exists() + module_invoke() is duplicate and makes no sense.

sun’s picture

Status: Needs work » Fixed
StatusFileSize
new966 bytes

Thanks for reporting, reviewing, and testing! Committed attached patch to 3.x.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

salvis’s picture

Thanks. I was confused about your comment in #1...

Isn't

!empty($switch_links) && count($switch_links) > 1

redundant, too?

sun’s picture

No that's

> 0 && > 1

salvis’s picture

Ah, yes, of course, I read your >1 as >0...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.