Fixed Deprecated constructor in library/Lgpl/utf8.php

pegasus

Well-known member
Not sure if you're aware of this, but PHP 7 has deprecated constructors like this:
Code:
class MyClass
{
function MyClass() {}
}
This option will be removed in the future in favor of:
Code:
class MyClass
{
function __construct() {}
}
While XenForo's debug mode is turned on I get a lot of errors like this:
Code:
Zend_Controller_Response_Exception: Cannot send headers; headers already sent in /home/vw/public_html/xf/library/Lgpl/utf8.php, line 545 - library/Zend/Controller/Response/Abstract.php:321
Around line 545, class utf8_entity_decoder has one of these deprecated constructors. After changing it to __construct(), I no longer receive these errors.
 
Top Bottom