diff options
Diffstat (limited to 'inc/HTTPClient.php')
-rw-r--r-- | inc/HTTPClient.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 2226103b3..de3a16830 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -254,7 +254,13 @@ class HTTPClient { } // add SSL stream prefix if needed - needs SSL support in PHP - if($port == 443 || $this->proxy_ssl) $server = 'ssl://'.$server; + if($port == 443 || $this->proxy_ssl) { + if(!in_array('ssl', stream_get_transports())) { + $this->status = -200; + $this->error = 'This PHP version does not support SSL - cannot connect to server'; + } + $server = 'ssl://'.$server; + } // prepare headers $headers = $this->headers; |