diff options
author | Nathan Gass | 2016-03-14 17:19:53 +0100 |
---|---|---|
committer | Nathan Gass | 2016-03-14 17:19:53 +0100 |
commit | 7f25197f10a29c0265d110170d33766069e7715c (patch) | |
tree | 31613f8e1a71f1589064f22359ccb1ec0c35537b /it.class | |
parent | 737df0101a7a9b1846b3859c8578d1d870092968 (diff) | |
download | itools-7f25197f10a29c0265d110170d33766069e7715c.tar.gz itools-7f25197f10a29c0265d110170d33766069e7715c.tar.bz2 itools-7f25197f10a29c0265d110170d33766069e7715c.zip |
handle 0 as default value
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -770,7 +770,7 @@ static function getopt($usage, $p = array()) list($shortoptname, $shortoptarg) = $matches; } - if ($default = it::match('\[(.*)\]\s*$', $usageline)) + if (($default = it::match('\[(.*)\]\s*$', $usageline)) !== null) { if ($longoptarg || $shortoptarg) $defaults[$longoptname ? $longoptname : $shortoptname] = it::replace(array('^default:?\s*' => ""), trim($default)); |