Fix: Parameter must be an array or an object that implements Countable

This commit is contained in:
Regis Houssin 2018-02-24 14:20:53 +01:00
parent 03d9bf1376
commit 3859b5a926

View File

@ -46,7 +46,7 @@ if (! empty($massaction) && count($toselect) < 1)
$error++;
setEventMessages($langs->trans("NoRecordSelected"), null, "warnings");
}
if (! $error && count($toselect) > $maxformassaction)
if (! $error && is_array($toselect) && count($toselect) > $maxformassaction)
{
setEventMessages($langs->trans('TooManyRecordForMassAction',$maxformassaction), null, 'errors');
$error++;