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

Fixed Deprecated constructor in library/Lgpl/utf8.php

Discussion in 'Resolved Bug Reports' started by pegasus, Apr 13, 2015.

  1. pegasus

    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.
     
    RoldanLT, Yoskaldyr, Xon and 2 others like this.
  2. RoldanLT

    RoldanLT Well-Known Member

    Preparing for
    :)
     
  3. Mike

    Mike XenForo Developer Staff Member

    Fixed now, thanks.
     
    Alfa1 likes this.

Share This Page