Support » Plugin: FireDrum Email Marketing » Firedrum Version 1.52 Breaks wordpress on PHP5.6

  • Hi, after updating your plugin on a wordpress site running in PHP 5.6 it completely crashes the site.

    Your in luck because I am a very experienced PHP developer, So I can tell you exactly what is wrong.

    In the file

    firedrum-email-marketing\integrations\woocommerce\cart.class.php on Line 260 is this call
    do_action( "{$this->plugin::get_branding()}_wc_cart_emptied" ); Unfortunately that’s not valid PHP syntax. Because you are using a static call with an Object instance and not a class name.

    In other places I see both a static call to this as well as a non-static call. Either one will work but one will give a notice.

    $this->plugin->get_branding() or Email_Marketing_Plugin::get_branding()

    In the constructor of that file is this line
    $this->plugin = Email_Marketing_Plugin::instantiate();

    In short, update you plugin for this bug as it’s not really a plugin users responsibility to debug this.

    Anyway, good luck.

Viewing 1 replies (of 1 total)
  • Thread Starter artisticphoenix

    (@artisticphoenix)

    I should have mentioned you can even do this

    
    $class = get_class($this->plugin);
    do_action( "{$class::get_branding()}_wc_cart_emptied" );
    

    As I see that the method is actually static

    It’s disheartening to see so many conflicting uses of static/non-static calls to this method in firedrum-email-marketing\plugin.class.php

    It’s also a pretty bad practice to use the outdated .class extension prefix. Not to mention the difficulty in finding the file for that class as it’s not named in any proper way.

    But enough of my Pet Peeves.

Viewing 1 replies (of 1 total)
  • The topic ‘Firedrum Version 1.52 Breaks wordpress on PHP5.6’ is closed to new replies.