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 5 years, 10 months ago by
thesmahesh.
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 5 years, 9 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