Throw a templater exception when a template attempts to access a non-existent key in a collection.

develop
Sven Slootweg 11 years ago
parent 539f54eac1
commit 58cfffd3d8

@ -557,7 +557,14 @@ class TemplateElement
{
if(is_null($operation))
{
return $target->context_item[$key_name];
if(isset($target->context_item[$key_name]))
{
return $target->context_item[$key_name];
}
else
{
throw new TemplateEvaluationException("The specified collection does not hold a variable named '{$key_name}'.");
}
}
elseif($operation == "isset")
{

Loading…
Cancel
Save