Sanity checking; clear eltdiff array.
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 16 Dec 2008 18:02:33 +0000 (11:02 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 16 Dec 2008 18:32:48 +0000 (11:32 -0700)
imp/lib/IMAP/Tree.php

index f428266..fd7e803 100644 (file)
@@ -1463,15 +1463,19 @@ class IMP_IMAP_Tree
      */
     public function eltDiff()
     {
-        if (!$this->_changed) {
+        if (is_null($this->_eltdiff) || !$this->_changed) {
             return false;
         }
 
-        return array(
+        $ret = array(
             'a' => array_keys($this->_eltdiff['a']),
             'c' => array_keys($this->_eltdiff['c']),
             'd' => array_keys($this->_eltdiff['d'])
         );
+
+        $this->_eltdiff = null;
+
+        return $ret;
     }
 
     /**