Fix lint.

This commit is contained in:
Pedro Silva 2023-12-12 18:16:43 +00:00
parent 81f606912f
commit e01cef5d16
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3

View file

@ -109,7 +109,7 @@ class RefreshFeatureStatusEndpoint {
* @return bool
*/
private function verify_nonce(): bool {
$json = json_decode( file_get_contents( 'php://input' ), true );
return wp_verify_nonce( $json['nonce'] ?? null, self::nonce() ) !== false;
$json = json_decode( file_get_contents( 'php://input' ) ?: '', true );
return wp_verify_nonce( $json['nonce'] ?? '', self::nonce() ) !== false;
}
}