fix fatal error, when getNamespace is giving a PEAR Error

This commit is contained in:
Klaus Leithoff 2011-09-23 10:10:15 +00:00
parent 99bcd1ef56
commit be0b9bba4f

View File

@ -407,22 +407,22 @@ class defaultimap extends Net_IMAP
$retrieveDefault = false;
if($this->hasCapability('NAMESPACE')) {
$nameSpace = $this->getNamespace();
if( PEAR::isError($nameSpace)) {
$lNameSpace = $this->getNamespace();
if( PEAR::isError($lNameSpace)) {
//error_log("emailadmin::defaultimap->getNameSpaces: called from->".function_backtrace());
if ($this->debug) error_log("emailadmin::defaultimap->getNameSpaces:".print_r($nameSpace,true));
if ($this->debug) error_log("emailadmin::defaultimap->getNameSpaces:".print_r($lNameSpace,true));
$retrieveDefault = true;
} else {
$result = array();
$result['personal'] = $nameSpace['personal'];
$result['personal'] = $lNameSpace['personal'];
if(is_array($nameSpace['others'])) {
$result['others'] = $nameSpace['others'];
if(is_array($lNameSpace['others'])) {
$result['others'] = $lNameSpace['others'];
}
if(is_array($nameSpace['shared'])) {
$result['shared'] = $nameSpace['shared'];
if(is_array($lNameSpace['shared'])) {
$result['shared'] = $lNameSpace['shared'];
}
}
}