summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2012-12-22 16:40:36 +0100
committerThomas Bruederli <thomas@roundcube.net>2012-12-22 16:40:36 +0100
commit4f5f2acd1649592569d13c88c7c946d4861834e0 (patch)
tree019fce03b518e24652389cfdcb5050259e18933c /program
parent5f0bd1fcb40eae92e747e0e855b77639fd17fc4a (diff)
parent7d88e614aec9d6dd3bfb6b85c774e2a53b741948 (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program')
-rw-r--r--program/lib/Roundcube/rcube_imap_generic.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php
index 112e91350..59a444da7 100644
--- a/program/lib/Roundcube/rcube_imap_generic.php
+++ b/program/lib/Roundcube/rcube_imap_generic.php
@@ -753,12 +753,16 @@ class rcube_imap_generic
$this->fp = @fsockopen($host, $this->prefs['port'], $errno, $errstr, $this->prefs['timeout']);
if (!$this->fp) {
+ if (!$errstr) {
+ $errstr = "Unknown reason (fsockopen() function disabled?)";
+ }
$this->setError(self::ERROR_BAD, sprintf("Could not connect to %s:%d: %s", $host, $this->prefs['port'], $errstr));
return false;
}
- if ($this->prefs['timeout'] > 0)
+ if ($this->prefs['timeout'] > 0) {
stream_set_timeout($this->fp, $this->prefs['timeout']);
+ }
$line = trim(fgets($this->fp, 8192));