From: kink Date: Fri, 15 Apr 2005 12:31:16 +0000 (+0000) Subject: 2 bugs in message_list: X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2bca4fda62efe475f73eb72f7c41e9df16503e15;p=squirrelmail.git 2 bugs in message_list: - in PHP 4.1.x, the first part of in_array may not be an array. This gives a lot of warnings in the message display. Not sure how to fix this, so just adding a note to it now. - initialize $aCol to empty array, not empty string, since it's expected to be an array further down. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9298 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/templates/default/message_list.tpl b/templates/default/message_list.tpl index bb155e86..cb04f12a 100644 --- a/templates/default/message_list.tpl +++ b/templates/default/message_list.tpl @@ -408,6 +408,7 @@ else * we have to do some php coding to display the columns in the right order */ foreach ($aOrder as $iCol) { + // FIXME: first parameter cannot be an array in PHP < 4.2 if (in_array($index_order_part, $show_label_columns)) { $sLabelStart = ''; @@ -415,7 +416,7 @@ else $sLabelStart = ''; $sLabelEnd = ''; } - $aCol = (isset($aColumns[$iCol])) ? $aColumns[$iCol] : ''; + $aCol = (isset($aColumns[$iCol])) ? $aColumns[$iCol] : array(); $title = (isset($aCol['title'])) ? $aCol['title'] : ''; $link = (isset($aCol['link'])) ? $aCol['link'] : ''; $value = (isset($aCol['value'])) ? $aCol['value'] : '';