From 5a0cd76250596a554cd4082fbd08c8255f67db29 Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 10 Dec 2018 10:12:08 -0700 Subject: [PATCH] Fix PHP 7.2 warning "PHP Warning: count() Parameter must be an array or object ..." --- mail/inc/class.mail_ui.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 62aa739a7f..396f7e6639 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -1703,7 +1703,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));