array_shift($argv);
array_shift($argv);
- $opts = explode(',', 'table==,where==,dump-dir==');
+ $opts = explode(',', 'table==,where==,dump-dir==,dump-dir=');
require_once 'Console/Getopt.php';
$go = Console_Getopt::getopt2($argv, '', $opts );
if (is_object($go)) {
}
$errs = array();
foreach($opts as $req) {
+ if (substr($req,-2, 2) != '==') { // skip optional arguments
+ continue;
+ }
if (empty($args[substr($req,0, -2)])) {
$errs[] = "--".substr($req,0, -2) . ' is required';
}