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 1 reply, has 2 voices.

Last updated by Bruno Kos 4 months, 1 week ago.

Assisted by: Bruno Kos.

Author Posts
July 8, 2024 at 9:48 am #15911973

PA_Facts_2000

Background of the issue:
On multiple pages on the website of our customer, there is a PHP warning visible: Warning: Invalid argument supplied for foreach() in /home/forge/kidsandcarrots.nl/wp-content/plugins/gravityforms-multilingual/classes/Notification/Routing.php on line 154. I think it has something to do with WPML/translations but I cannot find any issues. The issue is shown here: hidden link and here hidden link but it isn't shown on the English contact page hidden link. I have updated the translations and plugins.

Symptoms:
Warning: Invalid argument supplied for foreach() in /home/forge/kidsandcarrots.nl/wp-content/plugins/gravityforms-multilingual/classes/Notification/Routing.php on line 154

Questions:
What can be a solution for the PHP warning related to GravityForms Multilingual?
Why is the issue not shown on the English contact page?

July 8, 2024 at 2:38 pm #15914095

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

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

Hi,

Thank you for contacting WPML support!

For this issue, can you try this:

go to: wp-content/plugins/gravityforms-multilingual/inc/gravity-forms-multilingual.class.php
Change from:

			// Sub-labels using the default values. See <em><u>hidden link</u></em>.
			if ( isset( $field->inputs ) ) {

to:

			// Sub-labels using the default values. See <em><u>hidden link</u></em>.
			if ( isset( $field->inputs ) && !is_string($field->inputs) ) {

If still showing, can you tell me if this error shows if you downgrade to Version 1.7.2 https://wpml.org/download/gravityforms-multilingual/?section=changelog

Regards,
Bruno Kos

July 10, 2024 at 6:30 am #15925859

PA_Facts_2000

The change to the php didn't change anything. But downgrade to Version 1.7.2 did do the job.