summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2012-02-14 13:54:16 +0000
committerUrban Müller2012-02-14 13:54:16 +0000
commit2a037e9d238f5637c0068ddcd7c5f5a683d4936c (patch)
tree451716915990e8c0e8c540d140d670f1c791bba7
parentda59d3b21f7775153d1946b1d67585393e8316b4 (diff)
downloaditools-2a037e9d238f5637c0068ddcd7c5f5a683d4936c.tar.gz
itools-2a037e9d238f5637c0068ddcd7c5f5a683d4936c.tar.bz2
itools-2a037e9d238f5637c0068ddcd7c5f5a683d4936c.zip
warn about undefined text variables
-rw-r--r--it_text.class4
1 files changed, 4 insertions, 0 deletions
diff --git a/it_text.class b/it_text.class
index 6863750..4fce590 100644
--- a/it_text.class
+++ b/it_text.class
@@ -228,7 +228,11 @@ function transmogrify($text, $values = null)
if (is_object($value))
$value = $value->$key;
else
+ {
$value = $value[$key];
+ if ($value === null && $values)
+ it::error("No value given for text variable \{$key\}");
+ }
}
$result .= $value;