$iError = 0;
$aFetchItems = $aHeaderItems = array();
// initialize the fields we want to retrieve:
+ $aHeaderFields = array();
foreach ($aFetchHeaders as $v) {
switch ($v) {
case SQM_COL_DATE: $aHeaderFields[] = 'Date'; break;
$id_slice = array_slice($aUid,$start_msg-1,$iLimit);
/* do some funky cache checks */
- if (isset($aMailbox['MSG_HEADERS'])) {
+ if (isset($aMailbox['MSG_HEADERS']) && is_array($aMailbox['MSG_HEADERS'])) {
$aUidCached = array_keys($aMailbox['MSG_HEADERS']);
} else {
$aMailbox['MSG_HEADERS'] = array();
// FIXME: don't break 8bit symbols and html entities during truncation
if (isset($aColumnDesc[$k]['truncate']) && $aColumnDesc[$k]['truncate']) {
$sTmp = truncateWithEntities($value, $aColumnDesc[$k]['truncate']-$iIndent);
- $title = ($sTmp != $value) ? $value : '';
+ // drop any double spaces since these will be displayed in the title
+ $title = ($sTmp != $value) ? preg_replace('/\s{2,}/', ' ', $value) : '';
$value = $sTmp;
}
/* generate the link to the message */
'answered'=>false,
'flagged' => false,
'draft' => false);
+
+ if(!is_array($value)) $value = array();
foreach ($value as $sFlag => $value) {
switch ($sFlag) {
case '\\seen' : $aFlagColumn['seen'] = true; break;