You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm currently using Pebble Version: 3.1.2 in strict mode.
When using a map as context, I was expecting an AttributeNotFoundException if the map was empty, in this case It just resolved to null. I think the expected behavior in strict mode would be to throw an Exception every time the key is not present, even if the map is actually empty.
if(context.isStrictVariables() && !object.containsKey(key)) {
thrownewAttributeNotFoundException(null, String.format(
"Attribute [%s] of [%s] does not exist or can not be accessed and strict variables is set to true.",
attributeNameValue.toString(), object.getClass().getName()),
attributeNameValue.toString(), lineNumber, filename);
}
Hi, I'm currently using Pebble Version: 3.1.2 in strict mode.
When using a map as context, I was expecting an
AttributeNotFoundException
if the map was empty, in this case It just resolved to null. I think the expected behavior in strict mode would be to throw an Exception every time the key is not present, even if the map is actually empty.A quick fix to this would be to move this part:
above this part
Thank you !
The text was updated successfully, but these errors were encountered: