You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
// 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:
The text was updated successfully, but these errors were encountered:
Do we really need is_first and is_last? This seems like a hold over from when we couldn't handle this with pure CSS.
If we need it we should be able to use array_key_first and array_key_last.
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)
Additional information/references
At issue is this logic:
SMF/Sources/Subs-Menu.php
Line 233 in e8c7800
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:
![image](https://user-images.githubusercontent.com/23568484/194725474-eed06f8d-15d0-45ae-9b9a-416b74757078.png)
The text was updated successfully, but these errors were encountered: