WordPress.org

Forums

NextGEN Facebook - Complete Meta Tags for Facebook, Google, Pinterest, Twitter & More
[resolved] WordPress crashed because of update - Parse error (11 posts)

  1. thomadaneau
    Member
    Posted 1 year ago #

    "Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /homepages/10/d281449593/htdocs/pta/wp-content/plugins/nextgen-facebook/nextgen-facebook.php on line 38"

    http://wordpress.org/plugins/nextgen-facebook/

  2. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    Looking into it now.

    Thanks,

    js.

  3. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  4. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  5. oggi.incristo.net
    Member
    Posted 1 year ago #

    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

  6. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  7. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  8. oggi.incristo.net
    Member
    Posted 1 year ago #

    Ok. I confirm it is working again.

    Thank you

  9. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  10. thomadaneau
    Member
    Posted 1 year ago #

    thanks man!

  11. thomadaneau
    Member
    Posted 1 year ago #

    thanks man!
    oups double post

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.