Dennis1993
2013-07-26 d52a77a10d7eb0ea36543e59a11a6704f20f8605
Update Socket.php
1 files modified
11 ■■■■ changed files
program/lib/Net/Socket.php 11 ●●●● patch | view | raw | blame | history
program/lib/Net/Socket.php
@@ -672,10 +672,15 @@
     */
    function enableCrypto($enabled, $type)
    {
        if (!is_resource($this->fp)) {
            return $this->raiseError('not connected');
        if (version_compare(phpversion(), "5.1.0", ">=")) {
            if (!is_resource($this->fp)) {
                return $this->raiseError('not connected');
            }
            return @stream_socket_enable_crypto($this->fp, $enabled, $type);
        } else {
            $msg = 'Net_Socket::enableCrypto() requires php version >= 5.1.0';
            return $this->raiseError($msg);
        }
        return @stream_socket_enable_crypto($this->fp, $enabled, $type);
    }
}