Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 -

Supporter timezone: Europe/Zagreb (GMT+02:00)

This topic contains 2 replies, has 2 voices.

Last updated by Dražen 1 year, 3 months ago.

Assisted by: Dražen.

Author Posts
February 9, 2024 at 11:02 am #15285287

nathanR-5

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'] : '';

February 9, 2024 at 11:08 am #15285338

nathanR-5

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).

Screenshot_4.png
February 12, 2024 at 8:14 am #15291238

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for contacting us.

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.