diff --git a/class-two-factor-core.php b/class-two-factor-core.php index 4aeaa509..02d40e08 100644 --- a/class-two-factor-core.php +++ b/class-two-factor-core.php @@ -184,7 +184,7 @@ public static function get_providers() { * For each filtered provider, */ foreach ( $providers as $provider_key => $path ) { - include_once $path; + require_once $path; $class = $provider_key; @@ -785,7 +785,7 @@ public static function login_html( $user, $login_nonce, $redirect_to, $error_msg if ( ! function_exists( 'login_header' ) ) { // We really should migrate login_header() out of `wp-login.php` so it can be called from an includes file. - include_once TWO_FACTOR_DIR . 'includes/function.login-header.php'; + require_once TWO_FACTOR_DIR . 'includes/function.login-header.php'; } // Disable the language switcher. @@ -913,7 +913,7 @@ function() {

items = $security_keys; $u2f_list_table->prepare_items(); @@ -328,7 +328,7 @@ public static function delete_link( $item ) { public static function wp_ajax_inline_save() { check_ajax_referer( 'keyinlineeditnonce', '_inline_edit' ); - require TWO_FACTOR_DIR . 'providers/class-two-factor-fido-u2f-admin-list-table.php'; + require_once TWO_FACTOR_DIR . 'providers/class-two-factor-fido-u2f-admin-list-table.php'; $wp_list_table = new Two_Factor_FIDO_U2F_Admin_List_Table(); if ( ! isset( $_POST['keyHandle'] ) ) { diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 88447b08..5afbd140 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -30,9 +30,9 @@ tests_add_filter( 'muplugins_loaded', function() { - require dirname( __DIR__ ) . '/two-factor.php'; + require_once dirname( __DIR__ ) . '/two-factor.php'; } ); // Start up the WP testing environment. -require getenv( 'WP_PHPUNIT__DIR' ) . '/includes/bootstrap.php'; +require_once getenv( 'WP_PHPUNIT__DIR' ) . '/includes/bootstrap.php';