summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pear/Console/Getopt.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/pear/Console/Getopt.php b/pear/Console/Getopt.php
index 1f98a1c083..9bc48c1480 100644
--- a/pear/Console/Getopt.php
+++ b/pear/Console/Getopt.php
@@ -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");
}
}