Fixed ErrorException: [E_DEPRECATED] strtolower(): Passing null to parameter #1 ($string) of type string is deprecated

Lukas W.

Well-known member
Affected version
2.2.8
XF\Pub\Controller\Register Line 172 calls $this->assertBoardActive(null);, however the function call implicitly expects the first parameter to never be null, since it is run through strtolower before being passed on to the parent, which accepts null as value again.

Code:
public function assertBoardActive($action)
{
   switch (strtolower($action))
   {
      case 'connectedaccount':
         break;

      default:
         parent::assertBoardActive($action);
   }
}
 
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:
Improve PHP 8.1 compatibility within the Register controller
There may be a delay before changes are rolled out to the XenForo Community.
 
Just wanted to check to see if this has been resolved in 2.2.9; We are getting this error on PHP 8.1 when sending mail:
ErrorException: [E_DEPRECATED] strtolower(): Passing null to parameter #1 ($string) of type string is deprecated
src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php:256
 
Back
Top Bottom