• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 xen:calc intval question

Russ

Well-known member
#1
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 *
 

Mike

XenForo developer
Staff member
#2
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).