Fixed PHP 8.4: PHP Deprecated: Constant E_STRICT is deprecated in /web/public_html/src/XF/Template/Templater.php

Mike Fara

Active member
Affected version
2.3
Solution:

Code:
        public function handleTemplateError($errorType, $errorString, $file, $line)
        {
                switch ($errorType)
                {
                        case E_NOTICE:
                        case E_USER_NOTICE:
                                // ignore these (generally accessing an invalid variable)
                                return;

//                      case E_STRICT:
                        case E_DEPRECATED:
                        case E_USER_DEPRECATED:
 
A reminder that deprecated notices only get logged in debug/development mode and this does not affect normal usage in any way.
 
Yes, if you normally have the error reporting on in your php.ini, this one issue will fill up any log file fast, it was super annoying, so I thought I would mention it. Setting it to none does fix the error of the error being deprecated!
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.4).

Change log:
Improve PHP 8.4 compatibility
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom