Line 653 if sitepress.class is currently
$username = isset( $cookie_data['username'] ) ? $cookie_data['username'] : null;
If there is no cookie, this will cause a type error as WP_User expects the provided name to be a string.
This matters as in WP_User::get_data_by() the passed name ispassed into the trim function, which throws an error when not passed a string.
The fix is to simply update sitepress.class#653 to be:
$username = isset( $cookie_data['username'] ) ? $cookie_data['username'] : '';
In addition to the above, I have noticed more php8.2 deprecation notices:
Deprecated: Creation of dynamic property Whip_RequirementsChecker::$configuration is deprecated in C:\wamp\www\clients\blue-marine-foundation\wp-content\plugins\sitepress-multilingual-cms\vendor\yoast\whip\src\Whip_RequirementsChecker.php on line 37
Deprecated: Creation of dynamic property Whip_RequirementsChecker::$messageManager is deprecated in C:\wamp\www\clients\blue-marine-foundation\wp-content\plugins\sitepress-multilingual-cms\vendor\yoast\whip\src\Whip_RequirementsChecker.php on line 38
I have xdebug enabled on staging, so the above notices (apart from needing to be fixed) stop the site from loading due to the good old "headers already sent" warning (see attached image).