PHP 7.2 compatibility: count(null) now generates a PHP warning !!

SVN:trunk[5815]
This commit is contained in:
Denis Flaven
2018-05-28 14:08:31 +00:00
parent 04e41ab676
commit 6cc4a6e1be
4 changed files with 7 additions and 6 deletions

View File

@@ -457,7 +457,8 @@ class SearchForm
$aAllowedValues = $oAttrDef->GetAllowedValues();
return array('values' => $aAllowedValues, 'count' => count($aAllowedValues));
$iCount = is_array($aAllowedValues) ? count($aAllowedValues) : 0;
return array('values' => $aAllowedValues, 'count' => $iCount);
}
/**
@@ -668,4 +669,4 @@ class SearchForm
return $aOrCriterion;
}
}
}