1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-02-21 15:54:15 +01:00

check if $argv[1] is set before trying to access it

This commit is contained in:
Klas Lindfors 2012-05-14 12:50:10 +02:00
parent dd2cdb542c
commit fb01829487

View File

@ -1,6 +1,8 @@
#!/usr/bin/php
<?php
$verbose = 0;
if (isset($argv[1])) {
if ($argv[1] == "-h" || $argv[1] == "--help") {
print "Usage: " . $argv[0] . " [-h|--help] [-v]\n";
exit(1);
@ -13,6 +15,7 @@ if ($argv[1] && $argv[1] != "-v") {
}
$verbose = $argv[1] == "-v";
}
set_include_path(get_include_path() . PATH_SEPARATOR .
"/usr/share/ykval:/etc/ykval");