diff options
-rw-r--r-- | it.class | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -715,6 +715,8 @@ static function getopt($helplines) $mandatoryargs = array(); if ($tmp = trim(it::replace(array("\n.*" => "", "^\S+\s+\S+\s*" => "", "\[.*?\]\s*" => ""), trim($helplines)))) $mandatoryargs = preg_split('/\s+/', $tmp); + if ($mandatoryargs && !it::match("Usage:", $helplines)) + it::error("Usage string must contain 'Usage:'"); foreach (array_slice($_SERVER['argv'], 1) as $arg) { |