I am adding an item to a list and have "Enforce uniqueness" enabled. This gives me an error:
Warning: in_array() expects parameter 2 to be array, null given in rules_condition_data_list_contains() (line 359 of \sites\all\modules\rules\modules\data.eval.inc).
Adding an initial value to the "list" or disabling "Enforce uniqueness" causes this error to stop. I think its erroring because the array is empty.
Line 359 says:
return in_array($item, $list);
I think it should probably be:
return empty($list) ? FALSE : in_array($item, $list);
Comments
Comment #1
David Stosik commentedThis makes sense.
Here is a patch on 2.x-dev.
David
This patch is part of the #1day1patch initiative.
Comment #2
tr commentedBump. Patch still applies.