Permalink
Browse files

Check for openssl extension

  • Loading branch information...
1 parent aaf1531 commit a3e7a9fb9a378c96df66deb7daeaf229a2a06a16 @iwalz iwalz committed Jan 3, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 library/Zend/Http/Client/Adapter/Socket.php
View
6 library/Zend/Http/Client/Adapter/Socket.php
@@ -283,8 +283,10 @@ public function connect($host, $port = 80, $secure = false)
if (!$test || $error) {
// Error handling is kind of difficult when it comes to SSL
$errorString = '';
- while (($sslError = \openssl_error_string()) != false) {
- $errorString .= "; SSL error: $sslError";
+ if (extension_loaded('openssl')) {
+ while (($sslError = openssl_error_string()) != false) {
+ $errorString .= "; SSL error: $sslError";
+ }
}
$this->close();

0 comments on commit a3e7a9f

Please sign in to comment.