Home›Support›English Support›[Resolved] Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated
[Resolved] Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing multiple PHP errors in the WordPress admin area using WPML Version 4.6.13. These include a deprecated
rtrim()
function error, an undefined array key warning, and a fatal error related to a dismissed admin notice. Solution: We replicated the issue and confirmed that these problems will be addressed in the upcoming WPML 4.7 update. Until then, we recommend checking our known issues page and ensuring all other themes and plugins are up to date. If these steps do not resolve the issue or if the solution becomes outdated, please open a new support ticket at our support forum.
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.
Background of the issue:
I am trying to do anything in the WordPress admin area. This is WPML Version 4.6.13, so it is up to date. Using an output of the entire debug stack, with if(is_null($value) ) { $e = new Exception(); error_log($e->getTraceAsString()); }
Symptoms:
Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/wp-includes/formatting.php on line 2831. PHP Warning: Undefined array key "in-grace" in /var/www/html/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/admin-notices/Dismissed.php on line 105. PHP Fatal error: Uncaught Error: Value of type null is not callable in /var/www/html/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/admin-notices/Dismissed.php:105
Questions:
How can I resolve the deprecated rtrim() error?
What is causing the undefined array key "in-grace" warning?
How do I fix the PHP Fatal error related to the dismissed admin notice?
I regret any inconvenience caused, but to proceed with troubleshooting, I kindly ask for a snapshot of the site. Alternatively, with your permission, I can create one myself. For this purpose, I typically recommend using the free plugin "Duplicator." If you're already familiar with Duplicator (https://wordpress.org/plugins/duplicator/), please skip the following steps and simply send me the archive file you downloaded.
To guide you further, please adhere to these instructions:
1. View the Duplicator instructions video: hidden link
3. If the archive file exceeds 400MB, please use Duplicator's file filters to exclude cache, wp-uploads directory, media, and archive files.
Once you have the archive file ready, kindly share the link with us. You can utilize platforms like Google Drive, Dropbox, or similar for file sharing, as the snapshot file might be large.
Please note that your next reply will be private, visible only to you and me. You can paste the file link there. Rest assured that once the issue is resolved, I will delete the local site.