• Resolved regiopata

    (@regiopata)


    Hello,

    I like your plugin very much and it used to run properly until the update last week.

    My website didn′t work anymore, the error was:
    “Parse error: syntax error, unexpected ‘print’ (T_PRINT), expecting identifier (T_STRING) in …/plugins/simple-woocommerce-favourites/includes/class-swf-display.php on line 28”

    Unfortunatly I had to deactivate the plugin since then. Is this a known issue? Any help is appreciated very much!

    Thanks,

    Patrick

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jon Boss

    (@jonboss)

    Hi Patrick,

    Glad to hear you like the plugin, thanks for reaching out. What version of the plugin do you have installed? It looks like there must be something wrong with that file – is it possible it was edited accidentally? That line declares a function ‘print’ – it looks like maybe something is missing. Would you be able to download the latest copy of the plugin and let me know if the issue persists?

    albinholmlund

    (@albinholmlund)

    Hello, I had the same error and I’ve solved the bug. If you’re running a php-version older than 7.0.0, then you cant use “print” as a method name.

    /*
    Print the display
    */
    public static function print( $atts ){

    But as of PHP 7.0.0 these keywords are allowed as property, constant, and method names of classes, interfaces and traits, except that class may not be used as constant name.
    https://php.net/manual/en/reserved.keywords.php

    In file: includes/class-swf-display.php
    So you have to replace the print method call at line 18 and 21 with for example “print_favourites” instead and then rename the method at line 33 to “print_favourites”.

    Plugin Author Jon Boss

    (@jonboss)

    @albinholmlund

    Can’t thank you enough for helping to debug this one – great catch. I’ve just pushed an update for you Patrick – that will fix this compatibility issue with PHP < 7.0. You can update and this should be taken care of as suggested above.

    Thanks again, will mark this one resolved.

    Thread Starter regiopata

    (@regiopata)

    Thanks guys! works again, awesome as usual ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error after update’ is closed to new replies.