Setup/Fixup

* catch error if url from self test is unreachable
This commit is contained in:
Sarjuuk
2025-11-08 16:45:54 +01:00
parent cf4e8a527c
commit 8a169eb400

View File

@@ -451,7 +451,7 @@ CLISetup::registerUtility(new class extends UtilityScript
$res = get_headers($protocol.$host.$testFile, true, $ctx);
if (!preg_match('/HTTP\/[0-9\.]+\s+([0-9]+)/', $res[0], $m))
if (!$res || !preg_match('/HTTP\/[0-9\.]+\s+([0-9]+)/', $res[0], $m))
return false;
$status = $m[1];