"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
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

fago - May 5, 2009 - 13:04
Category:bug report» support request

It looks like $array1 is no array...

#2

koala098 - May 5, 2009 - 16:52

But it's initiated as an array:
$array1 = array();

#3

opensanta - May 26, 2009 - 18:34
Status:active» postponed (maintainer needs more info)

Please post an export of your rule.

#4

koala098 - June 9, 2009 - 13:53

I used a function with global variables, when I remove them, it works!?

#5

fago - June 26, 2009 - 11:37
Status:postponed (maintainer needs more info)» fixed

#6

System Message - July 10, 2009 - 11:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.