]> granicus.if.org Git - php/commitdiff
Fix for http://bugs.php.net/bug.php?id=21994
authorTomas V.V.Cox <cox@php.net>
Mon, 30 Jun 2003 10:09:44 +0000 (10:09 +0000)
committerTomas V.V.Cox <cox@php.net>
Mon, 30 Jun 2003 10:09:44 +0000 (10:09 +0000)
pear/Console/Getopt.php

index 1f98a1c08382c6b4c3828ed49facbfb210c046b9..9bc48c14801d5c27209cc4115fb394f5f259543b 100644 (file)
@@ -183,7 +183,7 @@ class Console_Getopt {
                 if (substr($long_opt, -2) != '==') {
                     /* Long option requires an argument.
                        Take the next argument if one wasn't specified. */;
-                    if (!$opt_arg && !(list(, $opt_arg) = each($args))) {
+                    if (!strlen($opt_arg) && !(list(, $opt_arg) = each($args))) {
                         return PEAR::raiseError("Console_Getopt: option --$opt requires an argument");
                     }
                 }