summaryrefslogtreecommitdiff
path: root/program/lib
diff options
context:
space:
mode:
authorDennis1993 <marvin-wegener@outlook.com>2013-07-26 18:41:09 +0200
committerDennis1993 <marvin-wegener@outlook.com>2013-07-26 18:41:09 +0200
commitd52a77a10d7eb0ea36543e59a11a6704f20f8605 (patch)
tree47e62ae33c1c047e8eec67fc1bcb1c298ec22283 /program/lib
parente9505469030cd5cfd0930c8f12c855057a32cad4 (diff)
Update Socket.php
Diffstat (limited to 'program/lib')
-rw-r--r--program/lib/Net/Socket.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/program/lib/Net/Socket.php b/program/lib/Net/Socket.php
index a67a11af1..bf1d1bbcd 100644
--- a/program/lib/Net/Socket.php
+++ b/program/lib/Net/Socket.php
@@ -672,10 +672,15 @@ class Net_Socket extends PEAR
*/
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);
}
}