diff --git a/getopts.php b/getopts.php index 18cd6df..468683d 100644 --- a/getopts.php +++ b/getopts.php @@ -316,9 +316,9 @@ class getopts if (array_key_exists ($pos+1, $tokens) && $tokens[$pos+1] === "--" && ! array_key_exists ($pos+2, $tokens)) - throw new \Exception (dgettext ("domframework", - "Mandatory value for parameter '$opt' is not provided ". - "after double-dash"), 500); + throw new \Exception (sprintf (dgettext ("domframework", + "Mandatory value for parameter '%s' is not provided after double-dash"), + $opt), 500); if (! array_key_exists ($pos+1, $tokens) || substr ($tokens[$pos+1], 0, 1) === "-") throw new \Exception (dgettext ("domframework",