Fix PHP 7.2 warning "PHP Warning: Invalid argument supplied for foreach()"

This commit is contained in:
nathangray 2018-12-10 09:32:24 -07:00
parent 7b69f8cfa5
commit 68a316fb3f

View File

@ -310,7 +310,7 @@ class Nextmatch extends Etemplate\Widget
$filters = $valid_filters[$form_name]; $filters = $valid_filters[$form_name];
} }
// Avoid empty arrays, they cause problems with db filtering // Avoid empty arrays, they cause problems with db filtering
foreach($filters['col_filter'] as $col => &$val) foreach((array)$filters['col_filter'] as $col => &$val)
{ {
if(is_array($val) && count($val) == 0) if(is_array($val) && count($val) == 0)
{ {