Hi WPML Support,
I'm experiencing a recurring ERR_TOO_MANY_REDIRECTS issue on our website (www.boc-group.com), and after a thorough investigation with our hosting provider (Kinsta), we have traced the root cause to a PHP error in the Gravity Forms Multilingual plugin during cross-language navigation.
---
ENVIRONMENT
- WordPress (latest)
- WPML and all addons (latest)
- Gravity Forms (latest)
- Gravity Forms Multilingual (latest)
- Hosting: Kinsta (Nginx)
- Language URL format: Language directories (e.g. /en/, /de/, /fr/)
- Browser language redirect: Disabled
- 5 active languages
---
THE ERROR
The following PHP warning appears in the Nginx error log at the exact timestamp the redirect loop occurred:
PHP Warning: foreach() argument must be of type array|object, null given in /wp-content/plugins/gravityforms-multilingual/classes/Notification/Routing.php on line 154
Full log entry:
2026/06/08 11:03:43 [error] 92626#92626: *1152671 FastCGI sent in stderr: "PHP message: PHP Warning: foreach() argument must be of type array|object, null given in /www/wwwbocgroupcom_728/public/wp-content/plugins/gravityforms-multilingual/classes/Notification/Routing.php on line 154", client: 80.243.171.190, server: hidden link, request: "GET /en/adogrc/?_gl=1*dgkq03*_up*MQ..*_gs*MQ..&gclid=EAIaIQobChMI1Piug7_3lAMVZ5CDBx2CBjjeEAAYASAAEgJaz_D_BwE HTTP/2.0", host: "www.boc-group.com", referrer: "hidden link...&gclid=..."
---
HOW TO REPRODUCE
1. A user arrives on a page containing a Gravity Form via a Google Ad — the URL contains both _gl (GA4 cross-domain linker) and gclid (Google Ads click ID) parameters
2. The user navigates or is redirected from the German language version (/de/adogrc/) to the English version (/en/adogrc/)
3. During that cross-language transition, Gravity Forms Multilingual throws the foreach() on null warning in Notification/Routing.php at line 154
4. The broken PHP response causes Nginx to serve a redirect, which was then being cached by the host — resulting in a redirect loop for all subsequent visitors to that URL
---
WHAT WE HAVE RULED OUT
- WPML Browser language redirect is disabled
- No conflicting redirect rules in Kinsta's redirect tool
- No permalink/rewrite rule issues
- All plugins, themes, and WordPress core are up to date
- The issue is consistently tied to cross-language navigation on pages with Gravity Forms, with _gl and gclid parameters present in the URL
---
WHAT WE NEED
The foreach() on null in Notification/Routing.php line 154 suggests that the plugin is not handling a null value gracefully during notification routing — likely when a form notification has no routing rules configured, or when the routing data is missing for a specific language context. This needs to be fixed in the plugin so it does not produce a broken response under these conditions.
Please advise on whether this is a known issue and if a fix is available or planned.
Thank you.