Hotfix - check ssl (#850)

Fixes #849.
Check ssl just when other error is not already in
CheckSsl should check PHP_VERSION and not PHP_RELEASE_VERSION
This commit is contained in:
Tim 2020-02-09 15:12:07 +01:00 committed by GitHub
commit 19fb244592
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -366,8 +366,10 @@ class StatusUpdater
}
}
// Check ssl cert
$this->checkSsl($this->server, $this->error, $result);
// Check ssl cert just when other error is not already in...
if ($result !== false) {
$this->checkSsl($this->server, $this->error, $result);
}
// check if server is available and rerun if asked.
if (!$result && $run < $max_runs) {
@ -404,7 +406,7 @@ class StatusUpdater
*/
private function checkSsl($server, &$error, &$result)
{
if (version_compare(PHP_RELEASE_VERSION, '7.1', '<')) {
if (version_compare(PHP_VERSION, '7.1', '<')) {
$error = "The server you're running PSM on must use PHP 7.1 or higher to test the SSL expiration.";
return;
}