From 7736e56928ed5de51eff73d00178765a113afb45 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Sat, 4 Sep 2010 01:33:53 -0600 Subject: [PATCH] Remove token data from memory when finished with it --- framework/Imap_Client/lib/Horde/Imap/Client/Socket.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php b/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php index a37ddb079..dfaa72f17 100644 --- a/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php +++ b/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php @@ -3794,7 +3794,6 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base /* Tokenize response. */ $line = implode(' ', array_slice($read, 1)); $binary = $literal = false; - $this->_temp['token'] = null; $this->_temp['literal8'] = array(); do { @@ -3836,6 +3835,7 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base } while (true); $ob['token'] = $this->_temp['token']['out']; + $this->_temp['token'] = null; } break; @@ -3945,7 +3945,7 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base */ protected function _tokenizeData($line) { - if (is_null($this->_temp['token'])) { + if (empty($this->_temp['token'])) { $this->_temp['token'] = array( 'in_quote' => false, 'paren' => 0, @@ -4245,9 +4245,9 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base break; case 'CAPABILITY': - $this->_temp['token'] = null; $this->_tokenizeData($data); $this->_parseCapability($this->_temp['token']['out']); + $this->_temp['token'] = null; break; case 'PARSE': @@ -4268,9 +4268,9 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base break; case 'PERMANENTFLAGS': - $this->_temp['token'] = null; $this->_tokenizeData($data); $this->_temp['mailbox']['permflags'] = array_map('strtolower', reset($this->_temp['token']['out'])); + $this->_temp['token'] = null; break; case 'UIDNEXT': -- 2.11.0