summaryrefslogtreecommitdiff
path: root/it_text.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_text.class')
-rw-r--r--it_text.class11
1 files changed, 3 insertions, 8 deletions
diff --git a/it_text.class b/it_text.class
index 4fce590..50076a8 100644
--- a/it_text.class
+++ b/it_text.class
@@ -225,14 +225,9 @@ function transmogrify($text, $values = null)
$value = $values ? $values : $GLOBALS;
foreach (explode(".", $part) as $key)
{
- if (is_object($value))
- $value = $value->$key;
- else
- {
- $value = $value[$key];
- if ($value === null && $values)
- it::error("No value given for text variable \{$key\}");
- }
+ $value = is_object($value) ? $value->$key : $value[$key];
+ if ($value === null && $values) # do not test in $GLOBALS mode
+ it::error("No value given for text variable \{$key\}");
}
$result .= $value;