Support » Plugin: Role Scoper » Undefined property: stdClass::$create_posts

  • I was getting alot of:

    Notice: Undefined property: stdClass::$create_posts in /path/to/wp-content/plugins/role-scoper/definitions_cr.php on line xxx

    Seems $cap doesn’t have create_posts variable so in definitions_cr.php I changed:

    if ( $force_create_posts_cap )
    	$arr["rs_{$name}_author"][$cap->create_posts] = true;

    to

    if ( $force_create_posts_cap )
    	if ( isset($cap->create_posts) )
    		$arr["rs_{$name}_author"][$cap->create_posts] = true;

    on all the lines referencing create_posts. This was in WPMU network section of WP3.4.2 just after activating the plugin..

    http://wordpress.org/extend/plugins/role-scoper/

  • The topic ‘Undefined property: stdClass::$create_posts’ is closed to new replies.