News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Does anyone know the fix for this issue?

Started by Grammy, February 25, 2025, 03:19:48 PM

Previous topic - Next topic

Grammy

It was reported as a known issue.

Undefined index: label

This portion of GenericMenu.template.php (2.1.4 default):
<a ', !empty($sub['selected']) ? 'class="chosen" ' : '', ' href="', $url, $menu_context['extra_parameters'], '">', $sub['label'], !empty($sub['amt']) ? ' <span class="amt">' . $sub['amt'] . '</span>' : '', '</a>
I have to clear it out every so often, I assume when someone's been messing around with their personal messages, but I'm unclear.  I don't understand how to decipher the mysteries of github. 

Illori


Sir Osis of Liver

Quote from: shawnb61 on August 28, 2023, 12:52:41 AMThe messages are harmless & can be ignored for now.

If it really bothers you, try this -


                    /// Fudge to remove undefined errors
                    if (!isset($sub['label']))
                        $sub['label'] = null;

                    echo '
                                        <li>
                                            <a ', !empty($sub['selected']) ? 'class="chosen" ' : '', ' href="', $url, $menu_context['extra_parameters'], '">', $sub['label'], !empty($sub['amt']) ? ' <span class="amt">' . $sub['amt'] . '</span>' : '', '</a>
                                        </li>';

Even if the whole world has forgotten,
The song remembers when.

                              - H. Prestwood

Grammy

Thank you, @Illori and @Sir Osis of Liver

It only bothers me today because, for some reason, they're blowing it up in there.  Thanks so much!  :)

Advertisement: