• Resolved edgar522

    (@edgar522)


    Hello,
    I just wanted to let you know that a client site of mine had a fatal error with the latest update(3.0.0), details below. I’ve removed the Theme name (custom) and redacted part of the file path for their privacy, but here is the error. I’m just going to keep the plugin deactivated until there’s a fix available, but figured you’d like to know.

    WordPress version 6.4.3
    Current plugin: Cision Block (version 3.0.0) PHP version 7.4.33

    Error Details

    An error of type E_PARSE was caused in line 9 of the file
    /wp-content/plugins/cision-block/src/Frontend/Frontend.php.
    Error message: syntax error, unexpected ‘Trait’ (T_TRAIT), expecting identifier (T_STRING) or ‘{‘

    Please let me know if there’s any other details I can provide that would be helpful.

    Cheers

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author cyclonecode

    (@cyclonecode)

    Hello

    I have not seen this before or had any problems related to it, but after some investigation it seems like this could be caused by me using “Trait” in the namespace. I will try to refactor the code and see if that solves it. Since I am not able to reproduce the error it would be awesome if you could send me your email address at [email protected] or join my slack channel so we can test if the fix work for you setup or not.

    Plugin Author cyclonecode

    (@cyclonecode)

    Changing the namespace from CisionBlock\Trait to CisionBlock\Traits fixes this issue. This only seems to be a problem in PHP 7.4.
    The reason is that trait being a reserved keyword in PHP.

    Plugin Author cyclonecode

    (@cyclonecode)

    Now I have created a patch that solves this issue. Download and install the latest version 3.0.1 and the problem should be fixed.

    Thread Starter edgar522

    (@edgar522)

    Thank you so much! This is perfect, I was able to re-activate the plugin without issue, thank you for your speedy resolution ??

    Plugin Author cyclonecode

    (@cyclonecode)

    No problem, glad I manage to solve it pretty fast. I am closing this as resolved now.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal error in latest update’ is closed to new replies.