Use of deprecated PHP4 style class constructor is not supported since PHP 7Why Deprecated issues come upUse of deprecated PHP4 style class constructor is not supported since PHP 7 while using constructxml version 1.0 encoding utf-8 in php?PHP Deprecated errors won't disappear on WordPress Dashboardhow upgrade to XML_Parser2?ESC character in CDATA sectionWorkaround for call time pass by reference deprecation in PHP?php/mysqlconnect deprecated error: Best way to upgrade to mysqliWarnings with Smarty after upgrade to PHP 7.0.8How to convert some old MySQL code to MySQLi?mysql real escape string and preg replace with array

Risk of getting Chronic Wasting Disease (CWD) in the United States?

Theorems that impeded progress

How old can references or sources in a thesis be?

Is it tax fraud for an individual to declare non-taxable revenue as taxable income? (US tax laws)

What do you call a Matrix-like slowdown and camera movement effect?

What does it mean to describe someone as a butt steak?

Can divisibility rules for digits be generalized to sum of digits

Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?

What do the dots in this tr command do: tr .............A-Z A-ZA-Z <<< "JVPQBOV" (with 13 dots)

Is it possible to do 50 km distance without any previous training?

Can I make popcorn with any corn?

Why not use SQL instead of GraphQL?

Font hinting is lost in Chrome-like browsers (for some languages )

How does strength of boric acid solution increase in presence of salicylic acid?

TGV timetables / schedules?

tikz: show 0 at the axis origin

How to find program name(s) of an installed package?

What defenses are there against being summoned by the Gate spell?

Why are electrically insulating heatsinks so rare? Is it just cost?

Can I ask the recruiters in my resume to put the reason why I am rejected?

Prove that NP is closed under karp reduction?

How could an uplifted falcon's brain work?

Collect Fourier series terms

I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine



Use of deprecated PHP4 style class constructor is not supported since PHP 7


Why Deprecated issues come upUse of deprecated PHP4 style class constructor is not supported since PHP 7 while using constructxml version 1.0 encoding utf-8 in php?PHP Deprecated errors won't disappear on WordPress Dashboardhow upgrade to XML_Parser2?ESC character in CDATA sectionWorkaround for call time pass by reference deprecation in PHP?php/mysqlconnect deprecated error: Best way to upgrade to mysqliWarnings with Smarty after upgrade to PHP 7.0.8How to convert some old MySQL code to MySQLi?mysql real escape string and preg replace with array






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I am trying to upgrade the PHP version of my WP site which is hosted on SiteGround. Upgrader tool shows this error:




33 | WARNING | Use of deprecated PHP4 style class constructor is not
supported since PHP 7




This is the code I found at the given location:



function gc_XmlBuilder($indent = ' ') 
$this->indent = $indent;
$this->xml = '<?xml version="1.0" encoding="utf-8"?>'."n";



How do I fix that?










share|improve this question
























  • Wow, PHP 4? Have you considered updating your WordPress?

    – Script47
    Jun 10 '18 at 14:55











  • This error is for a WordPress theme I've installed, not for the WordPress itself. The developer of the theme has not updated it in a while which is making it hard for me to keep my site's PHP version updated!

    – PrideOfElites
    Jun 10 '18 at 14:57


















0















I am trying to upgrade the PHP version of my WP site which is hosted on SiteGround. Upgrader tool shows this error:




33 | WARNING | Use of deprecated PHP4 style class constructor is not
supported since PHP 7




This is the code I found at the given location:



function gc_XmlBuilder($indent = ' ') 
$this->indent = $indent;
$this->xml = '<?xml version="1.0" encoding="utf-8"?>'."n";



How do I fix that?










share|improve this question
























  • Wow, PHP 4? Have you considered updating your WordPress?

    – Script47
    Jun 10 '18 at 14:55











  • This error is for a WordPress theme I've installed, not for the WordPress itself. The developer of the theme has not updated it in a while which is making it hard for me to keep my site's PHP version updated!

    – PrideOfElites
    Jun 10 '18 at 14:57














0












0








0








I am trying to upgrade the PHP version of my WP site which is hosted on SiteGround. Upgrader tool shows this error:




33 | WARNING | Use of deprecated PHP4 style class constructor is not
supported since PHP 7




This is the code I found at the given location:



function gc_XmlBuilder($indent = ' ') 
$this->indent = $indent;
$this->xml = '<?xml version="1.0" encoding="utf-8"?>'."n";



How do I fix that?










share|improve this question
















I am trying to upgrade the PHP version of my WP site which is hosted on SiteGround. Upgrader tool shows this error:




33 | WARNING | Use of deprecated PHP4 style class constructor is not
supported since PHP 7




This is the code I found at the given location:



function gc_XmlBuilder($indent = ' ') 
$this->indent = $indent;
$this->xml = '<?xml version="1.0" encoding="utf-8"?>'."n";



How do I fix that?







php wordpress warnings






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 10 '18 at 14:55









Script47

10k42248




10k42248










asked Jun 10 '18 at 14:54









PrideOfElitesPrideOfElites

105




105












  • Wow, PHP 4? Have you considered updating your WordPress?

    – Script47
    Jun 10 '18 at 14:55











  • This error is for a WordPress theme I've installed, not for the WordPress itself. The developer of the theme has not updated it in a while which is making it hard for me to keep my site's PHP version updated!

    – PrideOfElites
    Jun 10 '18 at 14:57


















  • Wow, PHP 4? Have you considered updating your WordPress?

    – Script47
    Jun 10 '18 at 14:55











  • This error is for a WordPress theme I've installed, not for the WordPress itself. The developer of the theme has not updated it in a while which is making it hard for me to keep my site's PHP version updated!

    – PrideOfElites
    Jun 10 '18 at 14:57

















Wow, PHP 4? Have you considered updating your WordPress?

– Script47
Jun 10 '18 at 14:55





Wow, PHP 4? Have you considered updating your WordPress?

– Script47
Jun 10 '18 at 14:55













This error is for a WordPress theme I've installed, not for the WordPress itself. The developer of the theme has not updated it in a while which is making it hard for me to keep my site's PHP version updated!

– PrideOfElites
Jun 10 '18 at 14:57






This error is for a WordPress theme I've installed, not for the WordPress itself. The developer of the theme has not updated it in a while which is making it hard for me to keep my site's PHP version updated!

– PrideOfElites
Jun 10 '18 at 14:57













1 Answer
1






active

oldest

votes


















3














Change the function to:



function __construct($indent = ' ') 
$this->indent = $indent;
$this->xml = '<?xml version="1.0" encoding="utf-8"?>'."n";



As you used to be able to define constructors via the class name and that has been deprecated as of PHP 7:




PHP 4 style constructors (methods that have the same name as the class they are defined in) are deprecated, and will be removed in the future. PHP 7 will emit E_DEPRECATED if a PHP 4 constructor is the only constructor defined within a class. Classes that implement a __construct() method are unaffected.




The error example, as per the documentation:




Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; foo has a deprecated constructor in example.php on line 3







share|improve this answer

























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f50784934%2fuse-of-deprecated-php4-style-class-constructor-is-not-supported-since-php-7%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    Change the function to:



    function __construct($indent = ' ') 
    $this->indent = $indent;
    $this->xml = '<?xml version="1.0" encoding="utf-8"?>'."n";



    As you used to be able to define constructors via the class name and that has been deprecated as of PHP 7:




    PHP 4 style constructors (methods that have the same name as the class they are defined in) are deprecated, and will be removed in the future. PHP 7 will emit E_DEPRECATED if a PHP 4 constructor is the only constructor defined within a class. Classes that implement a __construct() method are unaffected.




    The error example, as per the documentation:




    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; foo has a deprecated constructor in example.php on line 3







    share|improve this answer





























      3














      Change the function to:



      function __construct($indent = ' ') 
      $this->indent = $indent;
      $this->xml = '<?xml version="1.0" encoding="utf-8"?>'."n";



      As you used to be able to define constructors via the class name and that has been deprecated as of PHP 7:




      PHP 4 style constructors (methods that have the same name as the class they are defined in) are deprecated, and will be removed in the future. PHP 7 will emit E_DEPRECATED if a PHP 4 constructor is the only constructor defined within a class. Classes that implement a __construct() method are unaffected.




      The error example, as per the documentation:




      Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; foo has a deprecated constructor in example.php on line 3







      share|improve this answer



























        3












        3








        3







        Change the function to:



        function __construct($indent = ' ') 
        $this->indent = $indent;
        $this->xml = '<?xml version="1.0" encoding="utf-8"?>'."n";



        As you used to be able to define constructors via the class name and that has been deprecated as of PHP 7:




        PHP 4 style constructors (methods that have the same name as the class they are defined in) are deprecated, and will be removed in the future. PHP 7 will emit E_DEPRECATED if a PHP 4 constructor is the only constructor defined within a class. Classes that implement a __construct() method are unaffected.




        The error example, as per the documentation:




        Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; foo has a deprecated constructor in example.php on line 3







        share|improve this answer















        Change the function to:



        function __construct($indent = ' ') 
        $this->indent = $indent;
        $this->xml = '<?xml version="1.0" encoding="utf-8"?>'."n";



        As you used to be able to define constructors via the class name and that has been deprecated as of PHP 7:




        PHP 4 style constructors (methods that have the same name as the class they are defined in) are deprecated, and will be removed in the future. PHP 7 will emit E_DEPRECATED if a PHP 4 constructor is the only constructor defined within a class. Classes that implement a __construct() method are unaffected.




        The error example, as per the documentation:




        Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; foo has a deprecated constructor in example.php on line 3








        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jun 10 '18 at 15:04

























        answered Jun 10 '18 at 14:59









        Script47Script47

        10k42248




        10k42248





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f50784934%2fuse-of-deprecated-php4-style-class-constructor-is-not-supported-since-php-7%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript