From 12aa9dbe6de7a3e1ff2b9edc4ee366a5eabcfbfd Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 6 Jan 2012 14:57:52 +0000 Subject: [PATCH] catching pear error on cmdStatus --- egw-pear/Net/IMAPProtocol.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/egw-pear/Net/IMAPProtocol.php b/egw-pear/Net/IMAPProtocol.php index 67a459ac0f..3f9840f25e 100644 --- a/egw-pear/Net/IMAPProtocol.php +++ b/egw-pear/Net/IMAPProtocol.php @@ -1146,18 +1146,18 @@ class Net_IMAPProtocol { $ret = $this->_genericCommand('STATUS', $mailbox_name.' ('.$request.')'); - if (isset($ret['PARSED'])) { - foreach ($ret['PARSED'] as &$parsed) - { - if (!empty($parsed['EXT'])) - { - if(empty($ret['RESPONSE']['CODE'])) $ret['RESPONSE']['CODE'] ='OK'; - $ret['PARSED'] = $parsed['EXT']; - break; - } - } + if (!PEAR::isError($ret) && isset($ret['PARSED'])) { + foreach ($ret['PARSED'] as &$parsed) + { + if (!empty($parsed['EXT'])) + { + if(empty($ret['RESPONSE']['CODE'])) $ret['RESPONSE']['CODE'] ='OK'; + $ret['PARSED'] = $parsed['EXT']; + break; + } + } } - return $ret; + return $ret; }