Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Client/Adapter/Socket.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,10 @@ public function connect($host, $port = 80, $secure = false)
283283
if (!$test || $error) {
284284
// Error handling is kind of difficult when it comes to SSL
285285
$errorString = '';
286-
while (($sslError = openssl_error_string()) != false) {
287-
$errorString .= "; SSL error: $sslError";
286+
if (extension_loaded('openssl')) {
287+
while (($sslError = openssl_error_string()) != false) {
288+
$errorString .= "; SSL error: $sslError";
289+
}
288290
}
289291
$this->close();
290292

0 commit comments

Comments
 (0)