Fix Invalid argument supplied for foreach()

This commit is contained in:
ptibogxiv 2018-11-10 15:04:38 +01:00 committed by GitHub
parent 776d5e6fc6
commit 80782a366e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,9 +8,12 @@ if (empty($conf) || ! is_object($conf))
}
// Loop to complete $param for extrafields
if (! empty($search_array_options)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ...
{
foreach ($search_array_options as $key => $val)
{
$crit=$val;
$tmpkey=preg_replace('/search_options_/','',$key);
if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
}
}
}