From f9a4c8c48b7541fb7d412c9b3e3e0b3d5ce28a16 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 18 Aug 2010 10:04:42 +0000 Subject: [PATCH] fixed fatal error: Cannot use object of type PEAR_Error as array, happening eg. if no or wrong credentials --- egw-pear/Net/IMAPProtocol.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/egw-pear/Net/IMAPProtocol.php b/egw-pear/Net/IMAPProtocol.php index 0748a39de7..5c59d2890d 100644 --- a/egw-pear/Net/IMAPProtocol.php +++ b/egw-pear/Net/IMAPProtocol.php @@ -1518,7 +1518,7 @@ class Net_IMAPProtocol { } $mailbox_name=sprintf("%s",$this->utf_7_encode($mailbox_name) ); $ret = $this->_genericCommand('GETQUOTA', $mailbox_name ); - if(isset( $ret["PARSED"] ) ){ + if(!is_object($ret) && isset( $ret["PARSED"] ) ){ // remove the array index because the quota response returns only 1 line of output $ret['PARSED']=$ret["PARSED"][0]; } @@ -1545,7 +1545,7 @@ class Net_IMAPProtocol { $mailbox_name=sprintf("%s",$this->utf_7_encode($mailbox_name) ); $ret = $this->_genericCommand('GETQUOTAROOT', $mailbox_name ); - if(isset( $ret["PARSED"] ) ){ + if(!is_object($ret) && isset( $ret["PARSED"] ) ){ // remove the array index because the quota response returns only 1 line of output $ret['PARSED']=$ret["PARSED"][1]; }