Overview of the Issue
If you are using PHP 8.1 and have WPML String Translations active, you’ll encounter the following notice in your debug.log:
`Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in wp-contentpluginswpml-string-translationclassesslug-translationcustom-typeswpml-st-slug-translations.php on line 31`
Workaround
This issue is fixed in WPML 4.6.5. Updating solves it on your site, so you only need this workaround if you can’t update yet.
Update WPML to version 4.6.5