Skip to content

Commit

Permalink
fix https tests on php 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
gggeek committed Apr 14, 2024
1 parent f594a38 commit 1fc5e7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/09HTTPTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public function testHttps($method)
if (version_compare(PHP_VERSION, '8.0', '>=') && $this->args['SSLVERSION'] == 0)
{
$version = explode('.', PHP_VERSION);
$this->client->setSSLVersion(4 + $version[1]);
$this->client->setSSLVersion(min(4 + $version[1], 7));
}

$this->$method();
Expand Down Expand Up @@ -349,7 +349,7 @@ public function testHttpsSocket($method)
/// @todo we should probably look deeper into the Apache config / ssl version in use to find out why this
/// does not work well with TLS < 1.2
if ($this->args['SSLVERSION'] == 0) {
$this->client->setSSLVersion(5 + $version[1]);
$this->client->setSSLVersion(min(5 + $version[1], 7));
}
}
$this->$method();
Expand Down Expand Up @@ -389,7 +389,7 @@ public function testHttpsProxy($method)
if (version_compare(PHP_VERSION, '8.0', '>=') && $this->args['SSLVERSION'] == 0)
{
$version = explode('.', PHP_VERSION);
$this->client->setSSLVersion(4 + $version[1]);
$this->client->setSSLVersion(min(4 + $version[1], 7));
}

$this->$method();
Expand Down

0 comments on commit 1fc5e7c

Please # to comment.