Background of the issue:
The following error message appears in the Checkout layout (see below):
Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/strategy/class-wpml-url-converter-subdir-strategy.php on line 200 Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/wp-includes/formatting.php on line 2819 Deprecated: urlencode(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/wp-content/plugins/wp-seo-multilingual/classes/class-wpml-wpseo-filters.php on line 131
The issue is that there are deprecated warnings appearing due to passing null values to functions that expect a string in the following files: class-wpml-url-converter-subdir-strategy.php, formatting.php, and class-wpml-wpseo-filters.php. This is an outdated practice that is no longer supported in newer versions of PHP (e.g., PHP 8.x). These warnings indicate that the code needs to be updated to handle null values correctly to avoid potential errors in the future.
Symptoms:
Questions:
Can you please help me solve this issue?
Before proceeding further, can you please try to update WPML plugins to the latest versions?
IMPORTANT: Please take full backup of your website and database beforehand.
It is highly advised to try this on a staging/dev site first, so your live website isn't compromised.
You can try this by going to Plugins -> Add New -> Commercial -> Check for updates or manually downloading from https://wpml.org/account/downloads/ and uploading via Plugins -> Add New -> Upload.
Steps to update plugins manually from Plugins page:
- Download latest versions from https://wpml.org/account/downloads/
--- Click "download manually" to expand the list of plugins.
- Upload using Plugins -> Add New -> Upload.
--- Click "Replace current with uploaded" when asked.
- Activate, as needed.
And then check again for the said issue.
If issue continues to appear, please try with only WPML plugins active and a standard WordPress theme and see if issue is still reproducible?
Please let me know and I'll try my best to help you further on the matter.
Regards.
The topic ‘[Closed] Checkout layout problem’ is closed to new replies.