[buddypress-trac] [BuddyPress Trac] #6045: $bp->site_options should not be referenced directly

buddypress-trac noreply at wordpress.org
Sun Apr 5 18:18:14 UTC 2015

#6045: $bp->site_options should not be referenced directly
 Reporter:  boonebgorges      |       Owner:  boonebgorges
     Type:  task              |      Status:  closed
 Priority:  normal            |   Milestone:  2.3
Component:  Component - Core  |     Version:
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch         |
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * status:  new => closed
 * resolution:   => fixed


 In [changeset:"9698"]:
 #!CommitTicketReference repository="" revision="9698"
 Introduce `bp_core_get_root_option()` and use throughout BP.

 Previously, we referenced the `$bp->site_options` array directly. This
 problems in cases where these options may be referenced before the array
 initially populated. `bp_core_get_root_option()` will fetch the requested
 value from the array if it's been populated, and will populate it if it
 has not.

 Fixes #6045.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6045#comment:11>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list