Support » Plugin: Category Posts Widget » Bug in 4.9.1 – made whole site crash

  • johneer

    (@johneer)


    Hello,
    I updated the plugin to 4.9.1 and the whole site crashed without even being able to log in into WordPress administration. There was a parse error – Unexpected ‘[‘ on line 46 of loadmore.php. When I commented the line ($ret = [];) out, the site is up again. Could you please look into this? I’m not sure what the line does but the plugin seems to work fine without it (in my case).
    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mark-k

    (@mark-k)

    Hi @johneer,

    It sounds like you are running your site on a very outdated version of PHP (5.3). The best solution is to update your PHP to at least version 5.6 (7.0 is a much better one) which is the minimum version for WordPress 5.2.

    This wasn’t an intentional change to deprecate support for old PHP versions, and we are sorry that this happened, but we just don’t test against them so this kind of bug may have crept in 🙁
    Right now we are just unlikely to release an official fix just for this and force all the people that have already upgraded to do another upgrade.

    If for whatever reason you can not upgrade your PHP right now, you can just replace the “[]” with “array()”, and things should work (or you can leave that line commented out if you have no additional problem now), but this should be a very short term solution.

    johneer

    (@johneer)

    Thanks for the quick answer. Yes, the server is running on old PHP and there is no way to upgrade it now but as I’ll be migrating the site to a new server soon, where this should not be a problem any more. I’ll keep the line commented for now, as it works fine.
    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bug in 4.9.1 – made whole site crash’ is closed to new replies.