Skip to content

Commit 1e3b9a6

Browse files
committed
CLI: show help infor for empty argument
1 parent 15ace20 commit 1e3b9a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/cli/ispc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
//* Check input
4343
$module = $argv[1];
44-
if($module == '-h' || $module == '--help') $module = 'help';
44+
if(empty($module) || $module == '-h' || $module == '--help') $module = 'help';
4545
if(!preg_match("/[a-z0-9]{3,20}/",$module)) die("Invalid commandline option\n");
4646
//* Check if cli module exists and run it
4747
if(is_file('modules/'.$module.'.inc.php')) {

0 commit comments

Comments
 (0)