[buddypress-trac] [BuddyPress Trac] #7140: Class autoloading needs to check if the component is active before including the class

buddypress-trac noreply at wordpress.org
Fri Jun 24 18:56:28 UTC 2016


#7140: Class autoloading needs to check if the component is active before
including the class
--------------------------+--------------------
 Reporter:  r-a-y         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  2.6.1
Component:  Core          |     Version:  2.6.0
 Severity:  major         |  Resolution:
 Keywords:  has-patch     |
--------------------------+--------------------

Comment (by boonebgorges):

 > I'm kind of agnostic either way, so whatever everyone thinks is best is
 okay with me.

 Seems to me like we could embrace simplicity and use `!`.

 {{{
 if ( 'core' !== $component && ! bp_is_active( $component ) && !
 function_exists( 'tests_add_filter' ) ) {
 }}}

 Fix seems good to me. Nice catch.

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


More information about the buddypress-trac mailing list