From 8fa1bf6c0d7a628a7d3c19cbae4711b358dcb53a Mon Sep 17 00:00:00 2001 From: "Ing. Petr Suchy" Date: Fri, 7 Feb 2020 07:59:50 +0100 Subject: [PATCH 1/3] *edit - check ssl just when other error is not already in --- src/psm/Util/Server/Updater/StatusUpdater.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/psm/Util/Server/Updater/StatusUpdater.php b/src/psm/Util/Server/Updater/StatusUpdater.php index da0cb72e..7b54cbe0 100644 --- a/src/psm/Util/Server/Updater/StatusUpdater.php +++ b/src/psm/Util/Server/Updater/StatusUpdater.php @@ -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) { From 5934e9a25c1bedda308c1c5c38f28510deec5751 Mon Sep 17 00:00:00 2001 From: "Ing. Petr Suchy" Date: Fri, 7 Feb 2020 08:03:12 +0100 Subject: [PATCH 2/3] *fix - checkSsl should check PHP_VERSION and not PHP_RELEASE_VERSION --- src/psm/Util/Server/Updater/StatusUpdater.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/psm/Util/Server/Updater/StatusUpdater.php b/src/psm/Util/Server/Updater/StatusUpdater.php index 7b54cbe0..635dcd02 100644 --- a/src/psm/Util/Server/Updater/StatusUpdater.php +++ b/src/psm/Util/Server/Updater/StatusUpdater.php @@ -406,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; } From 7ffc75598a6685dc89b3e693fc02cef92dcf88d4 Mon Sep 17 00:00:00 2001 From: TimZ99 Date: Sun, 9 Feb 2020 15:10:07 +0100 Subject: [PATCH 3/3] Refactor --- src/psm/Util/Server/Updater/StatusUpdater.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/psm/Util/Server/Updater/StatusUpdater.php b/src/psm/Util/Server/Updater/StatusUpdater.php index 635dcd02..41f9aea3 100644 --- a/src/psm/Util/Server/Updater/StatusUpdater.php +++ b/src/psm/Util/Server/Updater/StatusUpdater.php @@ -367,9 +367,9 @@ class StatusUpdater } // Check ssl cert just when other error is not already in... - if ($result !== false) { - $this->checkSsl($this->server, $this->error, $result); - } + if ($result !== false) { + $this->checkSsl($this->server, $this->error, $result); + } // check if server is available and rerun if asked. if (!$result && $run < $max_runs) {