Aleksander Machniak
2012-12-22 7d88e614aec9d6dd3bfb6b85c774e2a53b741948
Add hint about possible disabled fsockopen() function on connection error
1 files modified
6 ■■■■ changed files
program/lib/Roundcube/rcube_imap_generic.php 6 ●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_imap_generic.php
@@ -753,12 +753,16 @@
        $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));