From 3f05ce543417dac2d1972e45978e6b17f55f06b3 Mon Sep 17 00:00:00 2001 From: Matthew Biskas Date: Thu, 14 Sep 2023 18:56:59 +0200 Subject: [PATCH] Fixed output of Ping on null --- src/Checks/Checks/PingCheck.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Checks/Checks/PingCheck.php b/src/Checks/Checks/PingCheck.php index 625144f9..d319a6c8 100644 --- a/src/Checks/Checks/PingCheck.php +++ b/src/Checks/Checks/PingCheck.php @@ -72,7 +72,9 @@ public function failureMessage(string $failureMessage): self public function run(): Result { if (is_null($this->url)) { - throw InvalidCheck::urlNotSet(); + return Result::make() + ->failed() + ->shortSummary(InvalidCheck::urlNotSet()->getMessage()); } try {