WPML
Status
Resolved
Reported for
WPML Multilingual CMS 4.6.8
Resolved in
WPML 4.6.10
Topic tags
Bug

Overview of the issue

The introduction of the str_contains() function in PHP 8 may led to compatibility issues if the following two conditions are true:

  • PHP version used is lower than 8.
  • WordPress version installed is older than 5.9.

An error like the following will be triggered:

Fatal error: Uncaught Error: Call to undefined function str_contains() in .../wp-content/plugins/sitepress-multilingual-cms/classes/request-handling/wpml-request.class.php:123 

Workaround

Please, make sure of having a full backup of your site before proceeding.

You can try to install the latest beta for WPML (v 4.6.10)

Or

Upgrade any (of both) of the following requirements:


  • PHP 8

  • WordPress version (+5.9).

All known issues →