Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
More error fixes on level 2
  • Loading branch information
szepeviktor committed Jul 15, 2024
commit 9ac7c2d52e2ef7281947b3ed655faa6ac542ba36
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