"Invalid argument supplied for foreach()" in "Execute custom PHP code"-Action
koala098 - May 4, 2009 - 17:29
| Project: | Rules |
| Version: | 6.x-1.0-rc2 |
| Component: | Rules Engine |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Hello,
If my rule is triggered the following message appears:
"warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\hierarchie.php on line 124".
Line 124: foreach($array1 as $p => $value2) {
There is no warning when I manually start this script.
Can anybody help me?

#1
It looks like $array1 is no array...
#2
But it's initiated as an array:
$array1 = array();
#3
Please post an export of your rule.
#4
I used a function with global variables, when I remove them, it works!?
#5
#6
Automatically closed -- issue fixed for 2 weeks with no activity.