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).
We are aware of Whip_RequirementsChecker and similar messages for 8.2, and it is scheduled for WPML 4.7.
Can you share what message you got for the first case, so I can check if reported already?
Thanks,
Drazen
The topic ‘[Closed] Type issue found which causes warning in PHP8.2’ is closed to new replies.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.