Merge pull request #8229 from hregis/7.0_bug3

FIX Parameter must be an array or an object that implements Countable
This commit is contained in:
Laurent Destailleur 2018-02-25 12:55:54 +01:00 committed by GitHub
commit 898f2cf0ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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++;