Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing PHP warnings on their WordPress site related to the WPML plugin. The warnings are due to the

wpml_upgrade_status

option in the

wp_options

table being a string instead of an array, which affects the

array_key_exists()

and causes illegal string offset errors in

CommandsStatus.php

.
Solution:
First, we recommend updating the WPML plugin and all its add-ons to the latest version, currently 4.7.6, to ensure all recent fixes and improvements are applied. Update instructions can be found here: http://wpml.org/faq/install-wpml/.
If updating does not resolve the issue, we suggest removing the

wpml_update_statuses

entry from the

wp_options

database table after making a backup of your database.
If the problem persists, please provide us with a staging site or a Duplicator copy of your website for further investigation. Instructions for creating a duplicator copy can be found here: https://wpml.org/fr/faq/provide-supporters-copy-site/.

Please note that this solution might be outdated or not applicable to your specific case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, do not hesitate to open a new support ticket for further assistance.

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.

Tagged: 

This topic contains 4 replies, has 1 voice.

Last updated by Dražen 1 month, 2 weeks ago.

Assisted by: Dražen.

Author Posts
May 30, 2025 at 10:11 pm #17093423

jaysonP

<b>Background of the issue: </b>
I am experiencing recurring PHP warnings on my WordPress site, which seem to be related to the WPML plugin. I have identified that the wpml_upgrade_status option in my wp_options table has an option_value that is the literal string 'completed'. The relevant code in CommandsStatus.php involves the get_update_option_value and set_update_status methods, which interact with the wpml_update_statuses option. The constant OPTION_KEY is defined as 'wpml_update_statuses'. The get_option() call for wpml_upgrade_status may be returning a string instead of an array, causing the warnings. The issue can be seen on a specific page, but I have not provided a link.

<b>Symptoms: </b>
PHP Warning: array_key_exists() expects parameter 2 to be array, string given in /wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/CommandsStatus.php on line 44. PHP Warning: Illegal string offset 'wpml-tm-upgrade-default-editor-for-old-jobs' in /wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/CommandsStatus.php on line 37.

<b>Questions: </b>
What is the correct procedure to resolve the PHP warnings related to wpml_upgrade_status?
Do you need any further information or access to my site to assist with this issue?

May 31, 2025 at 7:26 am #17093748

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

While one of my teammates takes care of your ticket, I will provide you with the first debugging steps.

Please update your WPML plugin and add-ons to the latest version, 4.7.6, to benefit from the latest bug fixes and improvements. This may not necessarily resolve your problem; however, we need to work on the newest code available to troubleshoot the issue best.

You can check the latest released versions under "My Account -> Downloads" on this site. Instructions to update can be found here: http://wpml.org/faq/install-wpml/

If you do not see the updates, you might need to click the Check for updates button in the Plugins → Add New Plugin → Commercial tab.

Please remember to backup your database before you proceed.

Let us know if the issue persists after an update has been done.

June 2, 2025 at 8:44 pm #17099429

jaysonP

Yes the issue persists

June 3, 2025 at 1:21 pm #17102501

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for the reply.

Would it be possible to provide us with a staging site or Duplicator copy of your website so we can have a further look on what is causing the issue?

- https://wpml.org/fr/faq/provide-supporters-copy-site/

Regards,
Drazen

June 10, 2025 at 6:52 am #17120322

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks, I checked and seems it is a know issue and next workaround fixes.

Please make a backup and try if it works for you also:

Remove wpml_update_statuses entry from the wp_options database table.

Our 2nd tier will further check and escalate to developers for permanent queue if needed and not only specific issue to your website due some corruption of data in field.

Regards,
Drazen