Fixed Deprecated exception when viewing debug page with PHP 8.1

TickTackk

Well-known member
Affected version
2.2.8
Code:
An exception occurred: [ErrorException] [E_DEPRECATED] trim(): Passing null to parameter #1 ($string) of type string is deprecated in src/XF/Debugger.php on line 229

XF::handlePhpError()
trim() in src/XF/Debugger.php at line 229
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 fatal error when viewing debug page on PHP 8.1
There may be a delay before changes are rolled out to the XenForo Community.
 
Top