mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
PHP 7.2 compatibility: count(null) now generates a PHP warning !!
SVN:trunk[5815]
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user