• Resolved KZeni

    (@kzeni)


    This plugin should either look to no longer claim it supports PHP 7.2, or make sure it actually does so those that might still be on PHP 7.2 for one reason or another don’t find their site going offline due to a plugin update.

    This is the exact error I got:

    Parse error:
    syntax error, unexpected ')' in
    /wp-content/plugins/zero-bs-crm/includes/ZeroBSCRM.DAL3.Export.php
    on line 282

    This happens due to PHP 7.2 not liking when the arguments are being provided when a function is being called is given a trailing comma. This type of thing isn’t an issue with arrays & things, but is very much a fatal error in situations like this one (when that comma really isn’t doing anything other than introducing a potential point of failure with certain PHP versions.)

    Editing includes/ZeroBSCRM.DAL3.Export.php:

    // retrieve segment
    $availObjs = $zbs->DAL->segments->getSegmentAudience(
        $extraParams['segment']['id'],
        -1, // all, no paging
        -1, // all, no paging
    );

    to instead be:

    // retrieve segment
    $availObjs = $zbs->DAL->segments->getSegmentAudience(
        $extraParams['segment']['id'],
        -1, // all, no paging
        -1 // all, no paging
    );

    fixes the issue (note how the trailing comma in the function call was removed… thankfully it’s super simple.)

    The site came back online after making that one edit.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter KZeni

    (@kzeni)

    I can definitely see this one being a quick fix (sooner than later since anyone using affected versions of PHP [which the plugin says it currently supports] will have their entire site break after updating [I found this out via my site auto-updating and getting a downtime monitor alert]) while PHP 7.3 (or maybe even higher) becomes the required PHP version for the release after this hotfix to avoid this in the future (leaving PHP 7.2 in a decent place while those sites should really look to update).

    Otherwise, this is a rather simple thing to avoid during development (don’t add commas like this that aren’t actually doing anything) if PHP 7.2 support is still seen as worthwhile for the time being.

    Hi @kzeni ,

    Thank you for the report! We’ll have a fix out (v5.5.3) very shortly, likely later today.

    Best,

    Cena

    Thread Starter KZeni

    (@kzeni)

    @cena Thanks for the quick update!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal Error: PHP 7.2 Syntax Error (breaking whole site)’ is closed to new replies.