• Alfo

    (@alfonsberger)


    Hi,

    we are getting a ton of these different messages in our debug.log. Any idea how to fix this? We use the latest version of the plugin.

    Thanks for your help
    Alfons

    PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; RE_Log has a deprecated constructor in /xxxx/wp-content/plugins/redirection/models/log.php on line 3

    PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; RE_404 has a deprecated constructor in /xxxxx/wp-content/plugins/redirection/models/log.php on line 140

    PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Red_Match has a deprecated constructor in /xxxxx/wp-content/plugins/redirection/models/match.php on line 3

    PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Red_Action has a deprecated constructor in /xxx/wp-content/plugins/redirection/models/action.php on line 3

    PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Red_Item has a deprecated constructor in /xxxx/wp-content/plugins/redirection/models/redirect.php on line 3

    https://www.ads-software.com/plugins/redirection/

Viewing 10 replies - 1 through 10 (of 10 total)
  • webrockers

    (@webrockers)

    Same here:

    WordPress 4.4.2
    Query Monitor 2.8.1
    qtranslate-x 3.4.6.4

    coendegoey

    (@coendegoey)

    I had exactly the same messages. I just upgraded to php 7.0 so that could be the reason.

    webrockers

    (@webrockers)

    That IS exactly the reason. I just forgot to mention. I apologize.

    I’d just like it to be fixed ??

    Thread Starter Alfo

    (@alfonsberger)

    Yes, it is a PHP 7 issue. So the question is how can it be fixed?

    webrockers

    (@webrockers)

    Hallo Alfons

    Class Name constructors are deprecated and need to be replaced through php7 style constructors. Their constructors have the same name, as their class name.

    pre PHP7 style constructor:

    class Foo {
        function Foo(){
            //do stuff
        }
    }

    PHP7 style constructors, though, are named __construct:

    class Foo {
        function __construct(){
            //do stuff
        }
    }

    The thing is, this should be done by the plugin developer.

    Take care
    Marco

    Thread Starter Alfo

    (@alfonsberger)

    Thanks Marco,
    it doesn’t look like the plugin developer offers any support through this forum. Last update 4 months ago, so I guess it is up to us to fix it.

    webrockers

    (@webrockers)

    You’re welcome.

    Give him some time.

    As a developer who offers free service or donation ware in some cases, I know, that financial support, even a small donation isn’t something a lot of people do. In fact, I haven’t yet for this plugin. Shame on me. A lot of those people just nag and complain, some even get angry.

    So the motivation lacks understandably, to put energy, time and afford in something like this, which might be the byproduct of need, the developer had for himself.

    What you or everyone who is dependent or impatient can do (a little technical skill and courage provided), is to cautiously search and replace those constructors.

    Best wishes

    Marco

    Thread Starter Alfo

    (@alfonsberger)

    Sure, I usually buy “pro” version of plugins where possible to also support the developer.
    In the meantime I just replace those constructors myself.

    Looks like the developer is aware of it.

    Resolved

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘PHP Deprecated message’ is closed to new replies.