From: pdontthink Date: Sat, 18 Nov 2017 22:44:10 +0000 (+0000) Subject: Minor fix and clarify return types X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fae2050d22f716f9a84f00dd00c1eec5ae0f82b1;p=squirrelmail.git Minor fix and clarify return types git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14735 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 42ae26cb..0f63f042 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -30,6 +30,8 @@ * (OPTIONAL; default is TRUE) * * @return array $aMailbox mailbox array with all relevant information + * (if $handle_errors is false and there was an + * error, the array will be empty) * * @since 1.5.1 * @author Marc Groot Koerkamp @@ -56,6 +58,8 @@ function sqm_api_mailbox_select($imapConnection,$account,$mailbox,$aConfig,$aPro $iSetIndx = $aConfig['setindex']; $aMbxResponse = sqimap_mailbox_select($imapConnection, $mailbox, $handle_errors); + if (empty($aMbxResponse)) + return $aMbxResponse; if ($mailbox_cache) { if (isset($mailbox_cache[$account.'_'.$mailbox])) {