Skip to content

Commit 4f7d30a

Browse files
committed
fix: parse flag error on elem is empty string
Signed-off-by: inhere <[email protected]>
1 parent e298f72 commit 4f7d30a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: src/Flags.php

+5
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,11 @@ public static function parseArgv(array $params, array $config = []): array
133133
while (false !== ($p = current($params))) {
134134
next($params);
135135

136+
// empty string
137+
if ($p === '') {
138+
continue;
139+
}
140+
136141
// is options
137142
if ($p[0] === '-') {
138143
$value = true;

0 commit comments

Comments
 (0)