mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-22 00:54:26 +01:00
check if $argv[1] is set before trying to access it
This commit is contained in:
parent
dd2cdb542c
commit
fb01829487
@ -1,19 +1,22 @@
|
|||||||
#!/usr/bin/php
|
#!/usr/bin/php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ($argv[1] == "-h" || $argv[1] == "--help") {
|
$verbose = 0;
|
||||||
print "Usage: " . $argv[0] . " [-h|--help] [-v]\n";
|
if (isset($argv[1])) {
|
||||||
exit(1);
|
if ($argv[1] == "-h" || $argv[1] == "--help") {
|
||||||
|
print "Usage: " . $argv[0] . " [-h|--help] [-v]\n";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($argv[1] && $argv[1] != "-v") {
|
||||||
|
print $argv[0] . ": invalid option -- '" . $argv[0] . "'\n";
|
||||||
|
print "Try `" . $argv[0] . " --help' for more information.\n";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
$verbose = $argv[1] == "-v";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($argv[1] && $argv[1] != "-v") {
|
|
||||||
print $argv[0] . ": invalid option -- '" . $argv[0] . "'\n";
|
|
||||||
print "Try `" . $argv[0] . " --help' for more information.\n";
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
$verbose = $argv[1] == "-v";
|
|
||||||
|
|
||||||
set_include_path(get_include_path() . PATH_SEPARATOR .
|
set_include_path(get_include_path() . PATH_SEPARATOR .
|
||||||
"/usr/share/ykval:/etc/ykval");
|
"/usr/share/ykval:/etc/ykval");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user