WordPress.org

Support

Support » Plugins and Hacks » [Resolved] WordPress crashed because of update – Parse error

[Resolved] WordPress crashed because of update – Parse error

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author JS Morisset
    Participant

    @jsmoriss

    Looking into it now.

    Thanks,

    js.

    Plugin Author JS Morisset
    Participant

    @jsmoriss

    Your PHP is too old for some code I used (http://docs.php.net/manual/en/language.oop5.paamayim-nekudotayim.php) — let me make a quick modification and get back to you.

    js.

    Plugin Author JS Morisset
    Participant

    @jsmoriss

    Well, you learn something new every day. 😉

    The following is fairly common to define a new class object:

    $var = new $classname();

    And the same can be done for static classes:

    $var = $classname::method();

    But only since PHP v5.3! (shaking head)

    I’ve modified the code to hard-code the static class names instead. I try and avoid hard-coding stuff when I can, but in this case there’s no way around it since a lot of people are still running older versions of PHP.

    Thanks for letting me know, and I hope it didn’t cause too many issues for you. I’ve updated the current v6.14.0 code. Since there’s no real change, I left the version number as-is. You’ll have to remove the current installed plugin and re-install it.

    Thanks,

    js.

    oggi.incristo.net
    Member

    @oggiincristonet

    The error is present at a different line now:

    Parse error: syntax error, unexpected T_FUNCTION in /home4/incristo/public_html/oggi/wp-content/plugins/nextgen-facebook/lib/social.php on line 65

    Plugin Author JS Morisset
    Participant

    @jsmoriss

    Oh great… http://us1.php.net/preg_replace_callback is supposed to be compatible with PHP 4.0.5+, but their example (using an anonymous function) is not! :-p

    Hold on. 😉

    js.

    Plugin Author JS Morisset
    Participant

    @jsmoriss

    Well, two-for-two in the PHP 5.3+ code today. 😉 Thank you very much for letting me know so quickly! 🙂

    Ok, hopefully that’ll be it. 😉 I’ve modified the preg_replace_callback() function to use a function, instead of including an anonymous function right in the arguments.

    Would you mind removing that exiting plugin and re-installing it? I left the version number as-is.

    Thanks,

    js.

    oggi.incristo.net
    Member

    @oggiincristonet

    Ok. I confirm it is working again.

    Thank you

    Plugin Author JS Morisset
    Participant

    @jsmoriss

    Phew! Thank you very much — to you both — for reporting this so quickly. In the future I will definitely keep a lookout for PHP pre-5.3 compatibility when I use new functions / techniques. 😉 Hopefully we won’t see this kind of issue again…

    Thank you, and again, apologies for any trouble this may have caused you.

    js.

    thomadaneau
    Member

    @thomadaneau

    thanks man!

    thomadaneau
    Member

    @thomadaneau

    thanks man!
    oups double post

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Resolved] WordPress crashed because of update – Parse error’ is closed to new replies.