From 2a037e9d238f5637c0068ddcd7c5f5a683d4936c Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Tue, 14 Feb 2012 13:54:16 +0000 Subject: warn about undefined text variables --- it_text.class | 4 ++++ 1 file changed, 4 insertions(+) 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; -- cgit v1.2.3