diff options
author | Dennis1993 <marvin-wegener@outlook.com> | 2013-07-26 13:35:10 +0200 |
---|---|---|
committer | Dennis1993 <marvin-wegener@outlook.com> | 2013-07-26 13:35:10 +0200 |
commit | ac1fa9871567473f34e3b400496ae08e9b6c0461 (patch) | |
tree | a5518273771bc450fab07630f5de64b798d3b422 /program/lib/Roundcube/rcube_imap_generic.php | |
parent | 60a79649f2a5f85d82af923e48cdf1cc895e9b10 (diff) |
Update rcube_imap_generic.php
remove sensless version_compare(). Min PHP Version is 5.2.1 so is a check of PHP 5.1.0 sensless. So never occurs.
Diffstat (limited to 'program/lib/Roundcube/rcube_imap_generic.php')
-rw-r--r-- | program/lib/Roundcube/rcube_imap_generic.php | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php index 920c7184a..5787f36b6 100644 --- a/program/lib/Roundcube/rcube_imap_generic.php +++ b/program/lib/Roundcube/rcube_imap_generic.php @@ -800,23 +800,21 @@ class rcube_imap_generic // TLS connection if ($this->prefs['ssl_mode'] == 'tls' && $this->getCapability('STARTTLS')) { - if (version_compare(PHP_VERSION, '5.1.0', '>=')) { - $res = $this->execute('STARTTLS'); + $res = $this->execute('STARTTLS'); - if ($res[0] != self::ERROR_OK) { - $this->closeConnection(); - return false; - } - - if (!stream_socket_enable_crypto($this->fp, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) { - $this->setError(self::ERROR_BAD, "Unable to negotiate TLS"); - $this->closeConnection(); - return false; - } + if ($res[0] != self::ERROR_OK) { + $this->closeConnection(); + return false; + } - // Now we're secure, capabilities need to be reread - $this->clearCapability(); + if (!stream_socket_enable_crypto($this->fp, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) { + $this->setError(self::ERROR_BAD, "Unable to negotiate TLS"); + $this->closeConnection(); + return false; } + + // Now we're secure, capabilities need to be reread + $this->clearCapability(); } // Send ID info |