mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 01:51:51 +00:00
Fix missing arg count check
This commit is contained in:
parent
5241118f0b
commit
c8f567b093
@ -745,6 +745,10 @@ function main(array $argv) : int{
|
|||||||
}
|
}
|
||||||
|
|
||||||
$callback = $options[$selected][1];
|
$callback = $options[$selected][1];
|
||||||
|
if(count($argv) !== count($options[$selected][0]) + 2){
|
||||||
|
fwrite(STDERR, "Usage: {$argv[0]} $selected " . implode(" ", array_map(fn(string $a) => "<$a>", $options[$selected][0])) . "\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
return $callback($argv);
|
return $callback($argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user