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

@@ -1234,7 +1234,7 @@ abstract class DBObject implements iDisplay
elseif ($oAtt->IsScalar())
{
$aValues = $oAtt->GetAllowedValues($this->ToArgsForQuery());
if (count($aValues) > 0)
if (is_array($aValues) && (count($aValues) > 0))
{
if (!array_key_exists($toCheck, $aValues))
{