We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d022b6 commit 558b46aCopy full SHA for 558b46a
src/Server_Command.php
@@ -70,7 +70,7 @@ class Server_Command extends WP_CLI_Command {
70
*
71
* @when before_wp_load
72
*/
73
- public function __invoke( $_, $assoc_args ) {
+ public function __invoke( $args, $assoc_args ) {
74
$defaults = array(
75
'host' => 'localhost',
76
'port' => 8080,
@@ -103,8 +103,11 @@ public function __invoke( $_, $assoc_args ) {
103
$cmd_args = array( WP_CLI::get_php_binary() );
104
105
// Add passthrough arguments before the -S flag
106
- if ( ! empty( $_ ) ) {
107
- foreach ( $_ as $arg ) {
+ if ( ! empty( $args ) ) {
+ foreach ( $args as $arg ) {
108
+ if ( '--' === $arg ) {
109
+ continue;
110
+ }
111
$cmd_format .= ' %s';
112
$cmd_args[] = $arg;
113
}
0 commit comments