• Resolved powerrs

    (@powerrs)


    Hi
    Error after update it was necessary to deactivate the plugin so that site would work again.
    Parse error: syntax error, unexpected wp-content\plugins\photonic\extensions\Photonic_Flickr_Processor.php on line 275

    some Idea?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    Interesting. Do you know which version of PHP you have?

    Line 275 seems pretty harmless:

    $method = wp_parse_args(substr($nested_query_url, stripos($nested_query_url, '?') + 1))['method'];

    So my guess is that your version of PHP is not able to handle fetching a value from an array returned from a function call in the same line.

    If you can upgrade your PHP version that should resolve the issue, otherwise the fix would be to break this line into 2:

    $method = wp_parse_args(substr($nested_query_url, stripos($nested_query_url, '?') + 1));
    $method = $method['method'];
    Thread Starter powerrs

    (@powerrs)

    It worked perfectly as expected! Changing line 275.

    $method = wp_parse_args(substr($nested_query_url, stripos($nested_query_url, '?') + 1));
    $method = $method['method'];

    I have already asked my Host to update PHP. Thank you so much. Hugs from Brazil

    You talk about PHP versions, but it worked before so are you saying the update added code only newer PHP could handle so breaking all sites with this plugin on older PHP versions? We cannot upgrade PHP on the server, as the server is old, you cant just upgrade PHP, its a big job.

    Making that change fixes it but have to block this plugin from updates now. You need backward compatibility OR a new plugin to be used on new PHP, not just upgrade a plugin for new PHP that is used on older PHP versions.

    Plugin Author Sayontan Sinha

    (@sayontan)

    Not sure I understand you. I already released a new version addressing the issue a day after this was reported.

    oh have you? I didnt realise. Its not showing in our wordpress updates yet. We have version Version 1.61, and this had the error in it. But if its fixed we can just wait for the next update and hopefully it will keep working.

    My meaning is that plugins should not be released with new PHP code that wont work on old PHP, else many websites will just break. I mean if you really must update your code for only newer PHP then release a completely new plugin so sites using the old one wont break, or add a check to run both code depending on the version. but I guess it was just a mistake and not intentional.

    • This reply was modified 8 years, 1 month ago by amityweb.

    So I notice your code for 1.61 has the fix. But ours states 1.61 and it has the line:
    $method = wp_parse_args(substr($nested_query_url, stripos($nested_query_url, ‘?’) + 1))[‘method’];

    So very strange??

    Plugin Author Sayontan Sinha

    (@sayontan)

    Weird. Can you delete the plugin folder and reinstall it? Your settings and galleries will remain intact.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘error after Update?’ is closed to new replies.