Examine error code returned by curl handle instead of return value from curl_exec. Using the return value from curl_exec resulted in failure on new mailboxes that did not contain any mail.
Signed-off-by: Tem Ogunfiditimi <tem@episof.com> Changed comparison to identical check Signed-off-by: Tem Ogunfiditmi <tem@episof.com> Signed-off-by: Tem Ogunfiditimi <tem@episof.com>
This commit is contained in:
committed by
Jonas Sulzer
parent
850de08ac9
commit
1fbc471efe
@@ -98,9 +98,10 @@ class IMAP extends Base {
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
|
||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'CAPABILITY');
|
||||
|
||||
$canconnect = curl_exec($ch);
|
||||
curl_exec($ch);
|
||||
$errorcode = curl_errno($ch);
|
||||
|
||||
if ($canconnect) {
|
||||
if ($errorcode === 0) {
|
||||
curl_close($ch);
|
||||
$uid = mb_strtolower($uid);
|
||||
$this->storeUser($uid, $groups);
|
||||
|
||||
Reference in New Issue
Block a user