• Resolved EvdHeuvel

    (@evdheuvel)


    After installing v2.9 I’m encountering the errors below (Running WordPress 5.3.2 on Xampp for Windows with PHP 7.4.1. Anyone came across these?

    Deprecated: Unparenthesizeda ? b : c ? d : eis deprecated. Use either(a ? b : c) ? d : eora ? b : (c ? d : e)` in C:\xampp_7.4\htdocs\ahm\wp-content\plugins\groups\lib\wp\class-groups-wordpress.php on line 81

    Deprecated: Unparenthesized a ? b : c ? d : e is deprecated. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) in C:\xampp_7.4\htdocs\ahm\wp-content\plugins\groups\lib\access\class-groups-access-meta-boxes.php on line 295`

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Kento

    (@proaktion)

    Hi, no sorry but none of this is pertinent to Groups. You likely have something interfering badly on your setup – might be a crappy optimization plugin or whatever … none of this is coming from Groups though.

    @proaktion

    WordPress 5.4
    php 7.4
    Groups Version 2.10.0

    Plugin could not be activated because it triggered a fatal error.

    Deprecated: Unparenthesizeda ? b : c ? d : eis deprecated. Use either(a ? b : c) ? d : eora ? b : (c ? d : e)in /var/www/vhosts/xxxxxx/httpdocs/wp-content/plugins/groups/lib/access/class-groups-access-meta-boxes.php on line 301

    Kindly help.
    Thanks and Regards

    • This reply was modified 4 years, 7 months ago by thesmahesh.
    Thread Starter EvdHeuvel

    (@evdheuvel)

    Hi Kento,

    Believe this is related to PHP version 7.4. Nested ternary operators without explicit parentheses are deprecated. https://www.php.net/manual/en/migration74.deprecated.php

    I fixed things by modifying the stated source files in the Groups plugin (obviously not my preference ;)). I’m currently running 2.10.0 of the Groups plugin.

    Erik

    Same problem here:

    Deprecated: Unparenthesizeda ? b : c ? d : eis deprecated. Use either(a ? b : c) ? d : eora ? b : (c ? d : e)in /Users/ronaldt/Sites/debugging.test/wp-content/plugins/groups/lib/wp/class-groups-wordpress.php on line 81

    and

    Deprecated: Unparenthesizeda ? b : c ? d : eis deprecated. Use either(a ? b : c) ? d : eora ? b : (c ? d : e)in /Users/ronaldt/Sites/debugging.test/wp-content/plugins/groups/lib/access/class-groups-access-meta-boxes.php on line 295

    The fix is quite easy @proaktion, like @evdheuvel mentioned:

    Change groups/lib/access/class-groups-access-meta-boxes.php on line 295 to:
    $post_id = !empty( $postarr['ID'] ) ? $postarr['ID'] : (!empty( $postarr['post_ID'] ) ? $postarr['post_ID'] : null);

    And change groups/lib/wp/class-groups-wordpress.php on line 81 to:
    $user_id = isset( $user->ID ) ? $user->ID : (isset( $args[1] ) ? $args[1] : 0);

    There might be more occurrences throughout the plugin though.

    • This reply was modified 4 years, 6 months ago by Ronaldt.

    Thanks @evdheuvel and @neejoh.

    I just got caught in the issue with a new server today and your fixes worked. This is months old and there’s no updates.

    @proaktion Is this plug-in still supported?

    Gerry

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Deprecated: Unparenthesized… error message’ is closed to new replies.