XF 1.5 xen:calc intval question

Russ

Well-known member
Just curious about the recent change, so the intval portion should be used if calling a specific thing from a css style property such as the padding, but there's no need if it's a single line style property?

Code:
{xen:calc 'intval(@content.padding-left) / 2'}px;

Code:
height: {xen:calc '@headerLogoHeight + @headerTabHeight * 2 + 2'}px; /* +2 borders *
 
It was done for PHP 7.1 compatibility if someone emptied a property we used for calculations. The places we didn't change were elements we didn't think were ever reasonable to empty (mostly because they're scalars and important).
 
Top Bottom