diff options
author | Andreas Gohr <gohr@cosmocode.de> | 2014-02-13 14:43:33 +0100 |
---|---|---|
committer | Andreas Gohr <gohr@cosmocode.de> | 2014-02-13 14:43:33 +0100 |
commit | 350eada6c66014c2bfb20902742120b7568ec576 (patch) | |
tree | 65cf096b0f70203afdca44a54aa7c53ea78a2a27 /inc/HTTPClient.php | |
parent | a916aa2f9ad60edcd6b2dc42dd61ccdec26f2aa0 (diff) | |
download | rpg-350eada6c66014c2bfb20902742120b7568ec576.tar.gz rpg-350eada6c66014c2bfb20902742120b7568ec576.tar.bz2 |
make HTTPclient check for SSL support
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; |