From 1ca5fc5f0aa5f7a436deaf58e2c7a3464c485210 Mon Sep 17 00:00:00 2001 From: "Tomas V.V.Cox" Date: Mon, 30 Jun 2003 10:09:44 +0000 Subject: [PATCH] Fix for http://bugs.php.net/bug.php?id=21994 --- pear/Console/Getopt.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); } } -- 2.50.1