Description
On occasion, I get an "Undefined index: label" error in the log. In this instance, the user is a global moderator, but doesn't have many of the moderation permissions.
Environment (complete as necessary)
- Version/Git revision: Current GH
- Database Type: MySQL
- Database Version: 8.0
- PHP Version: 8.1
Additional information/references
At issue is this logic:
|
// Set which one is first, last and selected in the group. |
Under certain (rare) circumstances, it can get to that logic without $first_sa and $last_sa being set. E.g., if the user doesn't have permission to do any of the activities in the submenu. First & last end up getting set on an undefined/null new entry. The template can't find the label, because it is null:
