Fix PHP 7.2 warning "PHP Warning: count() Parameter must be an array or object ..."

This commit is contained in:
nathangray 2018-12-10 10:12:08 -07:00
parent 351c2f56b7
commit 950682b7d3

View File

@ -1694,7 +1694,7 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
{
$sortResult = $sortResultwH;
}
$rowsFetched['rowsFetched'] = count($sortResult['header']);
$rowsFetched['rowsFetched'] = $sortResult['header'] ? count($sortResult['header']) : 0;
if (empty($rowsFetched['messages'])) $rowsFetched['messages'] = $rowsFetched['rowsFetched'];
//error_log(__METHOD__.__LINE__.' Rows fetched:'.$rowsFetched.' Data:'.array2string($sortResult));