add isset check
This commit is contained in:
parent
097ca9444f
commit
b9ab345946
1 changed files with 4 additions and 2 deletions
6
bin/cfg
6
bin/cfg
|
|
@ -153,8 +153,10 @@ try {
|
||||||
} catch (\Exception $ex) {
|
} catch (\Exception $ex) {
|
||||||
echo $usage;
|
echo $usage;
|
||||||
|
|
||||||
if ($argv[1] == '-h' || $argv[1] == '--help' || $argv[1] == 'help') {
|
if (isset($argv[1])) {
|
||||||
exit(0);
|
if ($argv[1] == '-h' || $argv[1] == '--help' || $argv[1] == 'help') {
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
echo $ex->getMessage().PHP_EOL;
|
echo $ex->getMessage().PHP_EOL;
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue