An assoc args with an option value shouldn't trigger the message "--foo parameter needs a value".
Because it doesn't needs a value. Else it would defeat the whole purpose of having `--foo[=<bar>]`.
It needs to be available within the command so you can still do something with it.
$errors['fatal'][] = "missing --$key parameter";
}
} else {
- if ( true === $assoc_args[ $key ] ) {
+ if ( true === $assoc_args[ $key ] && !$param['value']['optional'] ) {
$error_type = ( !$param['optional'] ) ? 'fatal' : 'warning';
$errors[ $error_type ][] = "--$key parameter needs a value";