• Resolved MooMee

    (@moomee8668)


    Hello,

    PHP Parse error: syntax error, unexpected ‘)’ in public_html/wp-content/plugins/ninja-forms/ninja-forms.php on line 653

    Trailing comma before bracket:

    unset(
           $items[ 'apps' ],
           $items[ 'memberships' ],
           $items[ 'services' ],
           $items[ 'user_access' ],
     );

    This syntax is OK for PHP 8, but all my sites running on PHP 7 crashed. Manually restored previous version and disabled auto update.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thank you for this MooMee – removing the trailing commas fixed this issue for me with 3.6.13

    I Have same problem!

    Thread Starter MooMee

    (@moomee8668)

    @wayee1, there are 2 options to fix it right now, before official patch released:

    1. Revert to previous version (3.6.12)

    2. Open file plugins/ninja-forms/ninja-forms.php and remove trailing comma at line 653, so this block:

    unset(
           $items[ 'apps' ],
           $items[ 'memberships' ],
           $items[ 'services' ],
           $items[ 'user_access' ],
     );

    becomes:

    unset(
           $items[ 'apps' ],
           $items[ 'memberships' ],
           $items[ 'services' ],
           $items[ 'user_access' ]
     );
    Plugin Support Curtis

    (@curtisbrownlee)

    Hi,

    Thank you for reporting this. I was able to replicate the issue when switching the PHP version of my site to 7.2. I have logged an issue for our engineering team.

    Ninja Forms currently supports the WordPress recommended requirement of PHP 7.4 or greater: https://wordpress.org/about/requirements/ PHP 7.4 is also the oldest version that is still receiving security updates.

    @curtisbrownlee out of the 900K installations, how many do you think are running on PHP8?
    And how many of these that are NOT PHP8 updated yesterday the plugin to discover it is generating fatal errors?

    WP itself runs even on PHP5.6.20.

    Thread Starter MooMee

    (@moomee8668)

    @dingdang, it is not because developer intentionally used some features of PHP 8 (which is not present in PHP 7). It is just about syntax because developer uses for testing PHP 8 environment and cannot see errors generated in PHP 7 environment. It can be fixed easily 🙂

    Thread Starter MooMee

    (@moomee8668)

    @curtisbrownlee, thanks for suggestion about PHP version. I know about “current / recommended” version, however PHP version is out of my control: on the shared hosting it is hoster who maintains system updates. And for some reason they keep old version despite regular complains… I think this is a common situation for many WordPress users.

    @moomee8668 Yes I was sarcastic – of these 900K sites, I guess not a low percent are now crashed after an autoupdate and more coming after a manual update.. they should remove this version from the repository ASAP. @otto42

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘ver 3.6.13 wrong syntaxt for PHP 7.2’ is closed to new replies.