From 0fc6fff44aad69cc9bca5e4bc013f04eecb68d90 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 3 Aug 2009 11:22:55 -0600 Subject: [PATCH] Make sure this number is cast to an integer --- imp/ajax.php | 2 +- imp/lib/Views/ListMessages.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/imp/ajax.php b/imp/ajax.php index 8261aab75..2e5f68cde 100644 --- a/imp/ajax.php +++ b/imp/ajax.php @@ -676,7 +676,7 @@ case 'ModifyPollFolder': if ($add) { $imptree->addPollList($mbox); if ($info = $imptree->getElementInfo($mbox)) { - $result->poll = array($mbox => $info['unseen']); + $result->poll = array($mbox => intval($info['unseen'])); } $notification->push(sprintf(_("\"%s\" mailbox now polled for new mail."), $display_folder), 'horde.success'); } else { diff --git a/imp/lib/Views/ListMessages.php b/imp/lib/Views/ListMessages.php index 292fd61a1..3731f3fde 100644 --- a/imp/lib/Views/ListMessages.php +++ b/imp/lib/Views/ListMessages.php @@ -221,7 +221,7 @@ class IMP_Views_ListMessages $imptree = IMP_Imap_Tree::singleton(); $info = $imptree->getElementInfo($mbox); if (!empty($info)) { - $md->unseen = $info['unseen']; + $md->unseen = intval($info['unseen']); } if ($sortpref['by'] == Horde_Imap_Client::SORT_THREAD) { -- 2.11.0