Make sure this number is cast to an integer
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 3 Aug 2009 17:22:55 +0000 (11:22 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 3 Aug 2009 17:57:06 +0000 (11:57 -0600)
imp/ajax.php
imp/lib/Views/ListMessages.php

index 8261aab..2e5f68c 100644 (file)
@@ -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 {
index 292fd61..3731f3f 100644 (file)
@@ -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) {