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.
We will wait for the 4.7 release. Seems like it has been in development for nearly a year so I really hope it comes soon
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.