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
Smarty has no support for the null coalescing operator. One might argue that it is not required, since the default modifier largely serves the same purpose. However, the default modifier is also triggered by an empty string: '', whereas the null coalescing operator would only replace a null value and leave everything else untouched.
Example:
{$myvar ?? 'undefined'}
This would render as 'undefined' if and only if:
myvar is undefined, or
myvar is set to null
myvar is set to 'undefined'
Otherwise, it should return the value set for myvar.
The text was updated successfully, but these errors were encountered:
Smarty has no support for the null coalescing operator. One might argue that it is not required, since the
default
modifier largely serves the same purpose. However, the default modifier is also triggered by an empty string:''
, whereas the null coalescing operator would only replace a null value and leave everything else untouched.Example:
{$myvar ?? 'undefined'}
This would render as
'undefined'
if and only if:null
'undefined'
Otherwise, it should return the value set for myvar.
The text was updated successfully, but these errors were encountered: