• Resolved loudliger

    (@loudliger)


    After the update today I received the following PHP error:

    Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in […]/wp-content/plugins/connections/includes/class.metabox-entry.php on line 56

    I was able to fix this by replacing “::” with “->” — then I received the same error on line 47 of /includes/admin/class.metabox-dashboard.php — which I was able to fix in the same way. The plugin appears to work fine for me with these two changes. Just thought I should mention it, because this probably needs to be addressed in the next update.

    https://www.ads-software.com/plugins/connections/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Steven

    (@shazahm1hotmailcom)

    @ loudliger

    Thanks for the feedback! I’m actually researching right now why the issue? I’m not able to reproduce on my sites…

    Technically the “::” and the “->” is wrong, hey, but if it works right!

    Again thanks, this definitely helps!

    Thread Starter loudliger

    (@loudliger)

    Yeah, I was surprised that it worked, but it does. Maybe it’s screwing something else up but I’m unable to find anything wrong. In any case, I am hoping it is a patchwork solution until you are able to figure out what the issue is. If it helps, the server is running PHP 5.2 — I would update that, but don’t want to create any other unwanted issues for the client.

    Plugin Author Steven

    (@shazahm1hotmailcom)

    @ loudliger

    I figured it out… this will only affect users still on PHP 5.2 … apparently the double column can only be used within the scope of the class, not “outside” using a variable as the class name in 5.2. So the “->” is correct for 5.2. This was changed in 5.3 which is why I could not duplicate it. So your fix is fine and will not break anything else.

    I’m going to push out 0.8.1 which fixes this, slightly differently.

    Instead of:
    $metabox::add( $atts );

    It’ll be:
    cnMetaboxAPI::add( $atts );

    Because this is a static method, I do not really need to be passing it via the $metabox var, I can simply call it directly using the class name.

    I verified that this will work just fine on 5.2.

    Apologies for the trouble!

    Thread Starter loudliger

    (@loudliger)

    Great, so I will update when you push out 0.8.1 and talk to the client about upgrading php. Thanks!

    dallasdoglife

    (@dallasdoglife)

    This is happening again with the most recent update. I’m about to try the same fixes described above.

    Plugin Author Steven

    (@shazahm1hotmailcom)

    @ dallasdoglife

    Nope, same fix will not work.

    It seems you host has a really old version of PHP installed. I recommend that you urge them to update to something that is more recent and supported:

    The PHP version the host is using: PHP Version 5.2.17

    Supported PHP versions:
    https://php.net/supported-versions.php

    PHP Version 5.2.17 has not been supported for over 4 years:
    https://php.net/eol.php

    With that said…

    Here’s the fix, that needed:

    https://github.com/Connections-Business-Directory/Connections/commit/c4250e1ecd52e04e60f3f51cc8f400d4bd753719

    I’ll push out an update 8.2.1 which will fix this.

    My apologies I did not catch this. I had to set my dev version of PHP to an even older version than what I was using to test.

    Wudman

    (@wudman)

    In the meantime for those of us broke due to 8.2, what is the quick fix that doesn’t wreck our directories?

    Plugin Author Steven

    (@shazahm1hotmailcom)

    @ Wudman

    The quick fix was in my last reply… but that is not needed any more as 8.2.1 which contains that fix has been released.

    Go to the WordPress Updates admin page, if Connections 8.2.1 does not show up as an available update, click the Check Again button. It should then show up as an update allowing you to update to it. Updating to 8.2.1 will address the compatibility issue with PHP 5.2.x. If click the Check Again button and it does not show up, then you’ll have to wait a little longer and try again.

    dallasdoglife

    (@dallasdoglife)

    Thank you so much! I lovelovelove Connections-Pro and appreciate your timely response! (And I’ll see what I can do to convince HostGator to step up their game.)

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘PHP error caused by latest update’ is closed to new replies.