Skip to content

Commit 63534ed

Browse files
committed
Fix Getopt on PHP8.1
1 parent 489fd6a commit 63534ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Util/Getopt.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ protected static function parseLongOption($arg, $long_options, &$opts, &$args)
144144

145145
if (substr($long_opt, -1) == '=') {
146146
if (substr($long_opt, -2) != '==') {
147-
if (!strlen($opt_arg)) {
147+
if (null === $opt_arg || strlen($opt_arg) < 1) {
148148
$opt_arg = current($args);
149149
next($args);
150150
if (!($opt_arg)) {

0 commit comments

Comments
 (0)