diff options
-rw-r--r-- | it.class | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -839,7 +839,11 @@ static function getopt($usage, $p = array()) if ($longoptname || $shortoptname) { if ($longoptname && ($shortoptname || $shortoptname === "0")) + { + if ($alias[$shortoptname]) + it::error("getopt: short option -$shortoptname is used twice: --{$alias[$shortoptname]} and --$longoptname!"); $alias[$shortoptname] = $longoptname; + } $witharg[$longoptname ? $longoptname : $shortoptname] = $longoptarg || $shortoptarg; } |