Skip to content

Commit 8706d63

Browse files
author
Michael Vasseur
committed
Check first
suggest by: Tobi
1 parent 48b887f commit 8706d63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

judge/judgedaemon.main.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ function dj_getopt(string $short_options, array $long_options = []): array
2020
{
2121
global $argv;
2222
define('GETOPT_REGEX', "/^([a-zA-Z0-9]:{0,2})*$/");
23-
$options = getopt($short_options, $long_options);
2423
if (preg_match(GETOPT_REGEX, $short_options) !== 1) {
2524
echo "Error: short options format specified is invalid.\n";
2625
usage();
2726
}
27+
$options = getopt($short_options, $long_options);
2828
if ($options===false || !is_array($argv)) {
2929
echo "Error: parsing options failed.\nPlease check: `register_argc_arg` in php.ini.\n";
3030
usage();

0 commit comments

Comments
 (0)