mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Setup/Fixup
* catch error if url from self test is unreachable
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user