[buddypress-trac] [BuddyPress Trac] #5334: Getting warning "Creating default object from empty value when enabling extended profiles"

buddypress-trac noreply at wordpress.org
Thu Jan 30 15:06:06 UTC 2014


#5334: Getting warning "Creating default object from empty value when enabling
extended profiles"
--------------------------+--------------------
 Reporter:  clamoreaux    |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  low           |   Milestone:  2.0
Component:  XProfile      |     Version:  1.9.1
 Severity:  minor         |  Resolution:
 Keywords:  needs-patch   |
--------------------------+--------------------
Changes (by boonebgorges):

 * keywords:  reporter-feedback => needs-patch
 * priority:  normal => low
 * severity:  normal => minor
 * milestone:  Awaiting Review => 2.0


Comment:

 Yes, I can see how this would happen if you were using this function
 outside of a `bp_has_members()` loop. If we're going to support this use
 (and it seems like we are, since we accept a 'user_id' param), then we
 should fix the reported issue. Probably the easiest is just to do the
 `$members_template->member->profile_data` setting only if `isset(
 $members_template->member )`; there's no need to cast it as `new stdClass`
 and then set this global if we're outside a loop (and in fact it could
 potentially cause problems).

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5334#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list