Skip to content

Commit

Permalink
More error fixes on level 2
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor committed Jul 15, 2024
1 parent 668ae87 commit 9ac7c2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions providers/class-two-factor-fido-u2f.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public static function enqueue_scripts() {
* @since 0.1-dev
*
* @param WP_User $user WP_User object of the logged-in user.
* @return null
* @return void
*/
public function authentication_page( $user ) {
require_once ABSPATH . '/wp-admin/includes/template.php';
Expand All @@ -165,7 +165,7 @@ public function authentication_page( $user ) {
?>
<p><?php esc_html_e( 'An error occurred while creating authentication data.', 'two-factor' ); ?></p>
<?php
return null;
return;
}

wp_localize_script(
Expand Down
8 changes: 4 additions & 4 deletions providers/class-two-factor-totp.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function enqueue_assets( $hook_suffix ) {
/**
* Rest API endpoint for handling deactivation of TOTP.
*
* @param WP_Rest_Request $request The Rest Request object.
* @param WP_REST_Request $request The Rest Request object.
* @return array Success array.
*/
public function rest_delete_totp( $request ) {
Expand All @@ -164,7 +164,7 @@ public function rest_delete_totp( $request ) {
/**
* REST API endpoint for setting up TOTP.
*
* @param WP_Rest_Request $request The Rest Request object.
* @param WP_REST_Request $request The Rest Request object.
* @return WP_Error|array Array of data on success, WP_Error on error.
*/
public function rest_setup_totp( $request ) {
Expand Down Expand Up @@ -203,8 +203,8 @@ public function rest_setup_totp( $request ) {
/**
* Generates a URL that can be used to create a QR code.
*
* @param WP_User $user The user to generate a URL for.
* @param string $key The secret key.
* @param WP_User $user The user to generate a URL for.
* @param string $secret_key The secret key.
*
* @return string
*/
Expand Down

0 comments on commit 9ac7c2d

Please sign in to comment.