Merge pull request #11301 from frederic34/patch-5

avoid warning with php 7.2
This commit is contained in:
Laurent Destailleur 2019-06-07 15:08:49 +02:00 committed by GitHub
commit 4ed7e281c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@ if (empty($objectclass) || empty($uploaddir))
// Mass actions. Controls on number of lines checked.
$maxformassaction=(empty($conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS)?1000:$conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS);
if (! empty($massaction) && count($toselect) < 1)
if (! empty($massaction) && is_array($toselect) && count($toselect) < 1)
{
$error++;
setEventMessages($langs->trans("NoRecordSelected"), null, "warnings");