Testing option value as a string

This commit is contained in:
Simon Males 2012-12-10 23:02:51 +08:00
parent 80773ad970
commit 693ca5481e

View file

@ -585,7 +585,7 @@ class ConsoleOptionParser {
$option = $this->_options[$name];
$isBoolean = $option->isBoolean();
$nextValue = $this->_nextToken();
$emptyNextValue = (empty($nextValue) && $nextValue != 0);
$emptyNextValue = (empty($nextValue) && $nextValue !== '0');
if (!$isBoolean && !$emptyNextValue && !$this->_optionExists($nextValue)) {
array_shift($this->_tokens);
$value = $nextValue;