- use @ operator for fclose() on connection handle

release-0.6
alecpl 14 years ago
parent f0485adef1
commit 3978cbf4cd

@ -186,8 +186,8 @@ class rcube_imap_generic
$buffer = fgets($this->fp, $size); $buffer = fgets($this->fp, $size);
if ($buffer === false) { if ($buffer === false) {
fclose($this->fp); @fclose($this->fp);
$this->fp = null; $this->fp = null;
break; break;
} }
if (!empty($this->prefs['debug_mode'])) { if (!empty($this->prefs['debug_mode'])) {
@ -263,7 +263,7 @@ class rcube_imap_generic
} else if ($res == 'BAD') { } else if ($res == 'BAD') {
return -2; return -2;
} else if ($res == 'BYE') { } else if ($res == 'BYE') {
fclose($this->fp); @fclose($this->fp);
$this->fp = null; $this->fp = null;
return -3; return -3;
} }
@ -286,7 +286,7 @@ class rcube_imap_generic
} }
if ($error && preg_match('/^\* (BYE|BAD) /i', $string, $m)) { if ($error && preg_match('/^\* (BYE|BAD) /i', $string, $m)) {
if (strtoupper($m[1]) == 'BYE') { if (strtoupper($m[1]) == 'BYE') {
fclose($this->fp); @fclose($this->fp);
$this->fp = null; $this->fp = null;
} }
return true; return true;
@ -311,7 +311,7 @@ class rcube_imap_generic
} }
if ($error && preg_match('/^\* (BYE|BAD) /i', $string, $m)) { if ($error && preg_match('/^\* (BYE|BAD) /i', $string, $m)) {
if (strtoupper($m[1]) == 'BYE') { if (strtoupper($m[1]) == 'BYE') {
fclose($this->fp); @fclose($this->fp);
$this->fp = null; $this->fp = null;
} }
return true; return true;
@ -418,7 +418,7 @@ class rcube_imap_generic
return $this->fp; return $this->fp;
} }
fclose($this->fp); @fclose($this->fp);
$this->fp = false; $this->fp = false;
$this->error = "Authentication for $user failed (LOGIN): $line"; $this->error = "Authentication for $user failed (LOGIN): $line";

Loading…
Cancel
Save