[buddypress-trac] [BuddyPress] #5305: Indirect modification of overloaded property BuddyPress::$signup

buddypress-trac noreply at wordpress.org
Wed Dec 18 08:36:28 UTC 2013


#5305: Indirect modification of overloaded property BuddyPress::$signup
--------------------------+-----------------------------
 Reporter:  reactuate     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Members       |    Version:  1.9
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 I have a plugin that calls bp_core_signup_user in bp-members-function.php
 from a 'bp_screens' action.

 I get the error "<b>Notice</b>:  Indirect modification of overloaded
 property BuddyPress::$signup has no effect in <b>/vagrant/wordpress/wp-
 content/plugins/buddypress/bp-members/bp-members-functions.php</b> on line
 <b>1308</b><br />"

 This is because $bp->signup hasn't been created yet.

 The fix is to add these lines at line 1308 before the line
 '$bp->signup->username = $user_login;' to insure the object exists:

 {{{
 if ( !isset( $bp->signup ) || !is_object( $bp->signup ) )
     {
         $bp->signup = new stdClass;
     }
 }}}

 This is similar to other places in the code where the object isn't created
 yet.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5305>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list