From 663459901455a084f81f9bba0fca407b93bedabc Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 14 Oct 2011 07:00:46 +0000 Subject: [PATCH] silence warning regarding array_slice() expects parameter 1 to be array when no messages are found, or the retrieval of uids failed somehow --- felamimail/inc/class.uiwidgets.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/felamimail/inc/class.uiwidgets.inc.php b/felamimail/inc/class.uiwidgets.inc.php index d129c318ab..fcef865ca8 100644 --- a/felamimail/inc/class.uiwidgets.inc.php +++ b/felamimail/inc/class.uiwidgets.inc.php @@ -749,7 +749,7 @@ $j(document).ready(function() { $rowsFetched['messages'] = count($sR); if($reverse === true) $sR = array_reverse((array)$sR); - $sR = array_slice($sR,($offset==0?0:$offset-1),$maxMessages); // we need only $maxMessages of uids + $sR = array_slice((array)$sR,($offset==0?0:$offset-1),$maxMessages); // we need only $maxMessages of uids $sRToFetch = array_slice($sR,0,50); // we fetch only the headers of a subset of the fetched uids //error_log(__METHOD__.__LINE__.' Rows fetched (UID only):'.count($sR).' Data:'.array2string($sR)); $maxMessages = 50;