summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
Diffstat (limited to 'it.class')
-rw-r--r--it.class8
1 files changed, 4 insertions, 4 deletions
diff --git a/it.class b/it.class
index 69b0089..99c42b0 100644
--- a/it.class
+++ b/it.class
@@ -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);
}