Page MenuHomePhabricator

Do not output mw-html-debug-log on page when the debug log is empty.
Closed, ResolvedPublic

Description

In Ifb0fbaa29170f79666078ff1e954f8e52f279a3f we unintentionally (as far as I can see) unconditionally added an element #mw-html-debug-log even when there is no debugging information.

@Krinkle flagged this during a code review, and I think the element should not be outputted when getHTMLDebugLog is empty

SkinMustache::tailElement should omit the element when it encounters an empty string.

Thoughts?

Event Timeline

The only time the function returns empty string is when $wgShowDebug = false is set. I think the element should be added at the function definition. The class is already doing so for the related debug toolbar message, and looks cleaner to me, than making SkinMustache to virtually do another check for this config setting.

Moving to getHTMLDebugLog makes sense to me.

Change 616988 had a related patch set uploaded (by Ammarpad; owner: Ammarpad):
[mediawiki/core@master] Don't output HTMLDebugLog div element when not needed

https://gerrit.wikimedia.org/r/616988

Change 616988 merged by jenkins-bot:
[mediawiki/core@master] Don't output HTMLDebugLog div element when not needed

https://gerrit.wikimedia.org/r/616988