Skip to:
Content

BuddyPress.org

Changeset 9311


Ignore:
Timestamp:
01/07/2015 11:44:19 PM (6 years ago)
Author:
johnjamesjacoby
Message:

Add method_exists checks to BP_Loader::setup_actions() to prevent adding actions for methods that may not exist.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-loader.php

    r9310 r9311  
    502502        // Add the actions
    503503        foreach( $actions as $class_action ) {
    504             add_action( 'bp_' . $class_action, array( $this, $class_action ), 5 );
     504            if ( method_exists( $this, $class_action ) ) {
     505                add_action( 'bp_' . $class_action, array( $this, $class_action ), 5 );
     506            }
    505507        }
    506508
Note: See TracChangeset for help on using the changeset viewer.