Skip Navigation

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.

This topic contains 3 replies, has 2 voices.

Last updated by Sumit 1 year, 1 month ago.

Assisted by: Sumit.

Author Posts
August 9, 2023 at 4:59 pm #14177639

Vincent

Hi,

After updating, and once activated, WPML spams this error on our staging, but not on the local env (count 112 on the plugins.php page):

rtrim(): Passing null to parameter #1 ($string) of type string is deprecated

Stack trace:
wp-includes/formatting.php:2809
rtrim()
wp-includes/formatting.php:2809
untrailingslashit()
wp-includes/formatting.php:2794
trailingslashit()
app/plugins/sitepress-multilingual-cms/classes/url-handling/class-wpml-include-url.php:27
WPML_Include_Url->filter_include_url()
wp-includes/class-wp-hook.php:310
apply_filters('style_loader_src')
wp-includes/class-wp-styles.php:412
WP_Styles->_css_href()
wp-includes/class-wp-styles.php:221
WP_Styles->do_item()
wp-includes/class-wp-dependencies.php:137
WP_Dependencies->do_items()
wp-includes/script-loader.php:2213
print_admin_styles()
wp-includes/class-wp-hook.php:308
do_action('admin_print_styles')
wp-admin/admin-header.php:132

Current version : Version 4.6.5
WP Version : 6.2.2

Only this plugin is activated, 2 languages domains are configured.

This appears to come from sitepress-multilingual-cms/classes/url-handling/class-wpml-include-url.php, in function filter_include_url where returns NULL.

Any fix would be appreciated.

For now, I just changed line 28 to this, but not sure it is actually the correct fix, not sure why I get a null value there, and I'm afraid the following fix will just hide unexpected behaviors.

if ( $php_host_in_domain && strpos( trailingslashit( $php_host_in_domain ), trailingslashit( $dom ) ) === 0 ) {

Any thought would be appreciated.

Regards.

August 10, 2023 at 7:29 am #14179757

Sumit
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi,

Thank you for contacting the support forum.

As I can see we did not make any changes to that mentioned file. Also, I found no changes from WP in untrailingslashit(). It could be you also upgraded the server to PHP 8?

Anyway, whatever is the case we will fix it. I am just trying to understand if this is really from the new version.

To debug this further, I need to request temporary access (wp-admin and FTP) to your site - preferably to a test site where the problem has been replicated if possible - in order to be of better help. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.
Instructions to send private information are here: hidden link

Privacy and Security when Providing Debug Information for Support:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Thanks

August 11, 2023 at 9:53 am #14187663

Vincent

Hello,

Thank you for quick answer.

Those errors disappeared. I think I was receiving those warnings because some Woocommerce DB updates were running in the background.
Now that the updates are finished, I do not receive those anymore.

Sorry for the inconvenience. This issue can be closed.

Regards.

August 11, 2023 at 4:07 pm #14189843

Sumit
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi,

Thanks for the update. I tried to replicate it after replying to you but I couldn't.
Please feel free to open a new ticket if you see them again.

Thanks

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.