Fixed PHP 8.1: Debugger.php, htmlspecialchars(null)


Well-known member
Affected version
This differs from but affects the same class.

An exception occurred: [ErrorException] [E_DEPRECATED] htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in src/XF/Debugger.php on line 204

htmlspecialchars() in src/XF/Debugger.php at line 204
XF\Debugger::getDatabaseDebugInfo() in src/XF/Debugger.php at line 124
XF\Debugger->getDebugPageHtml() in src/XF/App.php at line 2125
XF\App->finalOutputFilter() in src/XF/App.php at line 2355
XF\App->run() in src/XF.php at line 517
XF::runApp() in index.php at line 20

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.9).

Change log:
Fix null query parameter handling on the debug page
There may be a delay before changes are rolled out to the XenForo Community.