fix(letsencrypt): check for false as to avoid TypeError

This commit is contained in:
Mathieu Trossevin 2023-10-31 10:04:02 +01:00
parent e76ea90d89
commit 9419242465
Signed by: mtrossevin
GPG Key ID: D1DBB7EA828374E9
1 changed files with 3 additions and 0 deletions

View File

@ -157,6 +157,9 @@ class LetsEncrypt
{
$stream = stream_context_create(array("ssl" => array("capture_peer_cert" => true)));
$read = stream_socket_client("ssl://" . $domain . ":443", $errno, $errstr, 10, STREAM_CLIENT_CONNECT, $stream);
if ($read === false) {
return false;
}
$cont = stream_context_get_params($read);
return $cont;