[RSS Feed/News] Template variable filters which are not php 8.1 safe

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
The following snippet (more realistically from variable usage) will cause a warning in php 8.1+
XML:

{{ null|file_size }}

Will cause this error:
Code:

Template error: [E_DEPRECATED] number_format(): Passing null to parameter #1 ($num) of type float is deprecated

This affects a lot of the filters which handle stringy input that rattles down to an internal php function.

Test cases;
XML:

Code:
{{ null|file_size }}
{{ null|format }}
{{ null|hex }}
{{ null|host }}
{{ null|ip }}
{{ null|number_short }}
{{...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom