As per title, the If Conditions action's "IN" and "NOT IN" conditions check if the value exists within a STRING only, and doesn't check if the value exists in a given array.
E.g.
Check for 0 IN {value:[0,1]} gives you
E.g.
Check for 0 IN {value:[0,1]} gives you
Warning: explode() expects parameter 2 to be string, array given in C:\xampp\htdocs\dev\libraries\cegcore2\admin\extensions\chronofc\functions\if_conditions\if_conditions_output.phpon line28Because the code is
Warning: array_map(): Argument #2 should be an array in C:\xampp\htdocs\dev\libraries\cegcore2\admin\extensions\chronofc\functions\if_conditions\if_conditions_output.phpon line28
Warning: array_filter() expects parameter 1 to be array, null given in C:\xampp\htdocs\dev\libraries\cegcore2\admin\extensions\chronofc\functions\if_conditions\if_conditions_output.phpon line28
Warning: in_array() expects parameter 2 to be array, null given in C:\xampp\htdocs\dev\libraries\cegcore2\admin\extensions\chronofc\functions\if_conditions\if_conditions_output.phpon line29
$second = array_filter(array_map('trim', explode("\n", $second)), 'strlen');Should instead be
return in_array($first, $second);
if(!is_array($second)) {
$second = array_filter(array_map...... etcetc);
}
return in_array($first, $second);
True, bug fixed!
Thanks!
Thanks!
This topic is locked and no more replies can be posted.