• Resolved Alkerion

    (@alkerion)


    HI !

    I have this error happening nearly every second :

    PHP Notice: Trying to get property of non-object in /home/clients/d23…49/web3/wp-content/plugins/press-permit-core/groups-retrieval_pp.php on line 212

    Any idea what’s going wrong ?

    Thanks for support

    WP: 4.8
    PPC: 2.3.20
    PHP: 7.0.7

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Alkerion

    (@alkerion)

    Hi !

    I’ve tried fresh install, no changes, error still raised.

    I’ve tried to rollback to 2.3.19, no error anymore.

    Error only raised with 2.3.20

    Thread Starter Alkerion

    (@alkerion)

    Hi !

    I’ve remove the new buggy code section from groups-retrieval_pp.php and no error anymore.

    Hope to obtain support and fix.

    // ensure current WP roles are recognized even if pp_group_members entries out of sync
    			if ( ! empty( $args['wp_roles'] ) ) {
    				foreach( $args['wp_roles'] as $role_name ) { 
    					if ( is_object( $role_name ) )
    						$role_name = $role_name->name;
    					
    					$matched = false;
    					foreach( $user_groups as $ug ) {
    						if ( ! empty( $ug->metagroup_id ) && ( $ug->metagroup_id == $role_name ) && ( 'wp_role' == $ug->metagroup_type ) ) {
    							$matched = true;
    							break;
    						}
    					}
    					
    					if ( ! $matched ) {
    						$role_group = pp_get_metagroup( 'wp_role', $role_name );
    						$user_groups[$role_group->ID] = $role_group;
    					}
    				}
    			}
    • This reply was modified 8 years, 9 months ago by Alkerion.
    Plugin Author Kevin Behrens

    (@kevinb)

    Sorry about the PHP Notice. It’s fixed in Press Permit Core 2.3.21

    Thread Starter Alkerion

    (@alkerion)

    Hi Kevin,

    Thanks a lot for the quick fix, no log anymore 🙂

    Regards

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PHP Error on group retrieval’ is closed to new replies.