add isset check

This commit is contained in:
norb 2022-11-23 11:18:42 +01:00
commit b9ab345946

View file

@ -153,8 +153,10 @@ try {
} catch (\Exception $ex) {
echo $usage;
if ($argv[1] == '-h' || $argv[1] == '--help' || $argv[1] == 'help') {
exit(0);
if (isset($argv[1])) {
if ($argv[1] == '-h' || $argv[1] == '--help' || $argv[1] == 'help') {
exit(0);
}
}
echo $ex->getMessage().PHP_EOL;
exit(1);