diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -476,13 +476,13 @@ static function exec(/* $cmd, $values1 = array(), ... */) if ($value === true || $value === false || $value === null) $parts[] = $value ? $key : ""; else foreach ((array)$value as $val) - $parts[] = "$key " . it::_exec_quotevalue($val); + $parts[] = "$key " . it::_exec_quotevalue($val, "cmd=$cmd key=$key val=$val"); } } else { foreach ((array)$values[$key] as $value) - $parts[] = it::_exec_quotevalue($value); + $parts[] = it::_exec_quotevalue($value, "cmd=$cmd key=$key val=$val"); } $replacements[$tag] = join(" ", $parts); @@ -502,12 +502,12 @@ static function exec(/* $cmd, $values1 = array(), ... */) } #fails with C locale!!! -static function _exec_quotevalue($value) +static function _exec_quotevalue($value, $errmsg = "") { $result = strval($value); if (it::match('^-', $result)) - it::fatal("leading - in value"); + it::fatal("leading - in value: " . $errmsg); return escapeshellarg($result); } |