Skip to content

Commit

Permalink
Merge pull request #145 from Yoast/JRF/whip_wpmessagedismisslisterner…
Browse files Browse the repository at this point in the history
…-bug-fix

Whip_WPMessageDismissListener::listen(): bug fix
  • Loading branch information
jrfnl authored Sep 26, 2023
2 parents 4d772bf + d011711 commit 9efacd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Whip_WPMessageDismissListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function listen() {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce is verified in the dismisser.
$action = ( isset( $_GET['action'] ) && is_string( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : null;
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce is verified in the dismisser.
$nonce = ( isset( $_GET['nonce'] ) && is_string( $_GET['nonce'] ) ) ? sanitize_text_field( wp_unslash( $_GET['nonce'] ) ) : null;
$nonce = ( isset( $_GET['nonce'] ) && is_string( $_GET['nonce'] ) ) ? sanitize_text_field( wp_unslash( $_GET['nonce'] ) ) : '';

if ( $action === self::ACTION_NAME && $this->dismisser->verifyNonce( $nonce, self::ACTION_NAME ) ) {
$this->dismisser->dismiss();
Expand Down

0 comments on commit 9efacd2

Please sign in to comment.