Skip to content

Commit 6e654c0

Browse files
committed
use the empty string instead of null as an array offset
1 parent 273fd29 commit 6e654c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Input/ArgvInput.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ private function parseArgument(string $token): void
176176
} else {
177177
$all = $this->definition->getArguments();
178178
$symfonyCommandName = null;
179-
if (($inputArgument = $all[$key = array_key_first($all)] ?? null) && 'command' === $inputArgument->getName()) {
179+
if (($inputArgument = $all[$key = array_key_first($all) ?? ''] ?? null) && 'command' === $inputArgument->getName()) {
180180
$symfonyCommandName = $this->arguments['command'] ?? null;
181181
unset($all[$key]);
182182
}

0 commit comments

Comments
 (0)