- Affected version
- 2.0.4
This is something of a feature request but also an unexpected behaviour.
In php*, when
Template
This is important as XenForo will trigger errors when accessing an entity property which does not exist, where empty would cause
*Earlier php version only handle variable expressions (ie
In php*, when
empty()
is passed a variable expression (ie $foo->bar
) it calls isset()
before evaluating if the value is falsey.Template
empty()
just evaluates if an expression's value is falseyThis is important as XenForo will trigger errors when accessing an entity property which does not exist, where empty would cause
__isset
to be called on the entity.*Earlier php version only handle variable expressions (ie
empty($foo->bar)
), php 7+ handles expressions (ie empty(trim($foo->bar))
).
Last edited: