Skip to content

Commit

Permalink
fix phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
wordpressfan committed Feb 10, 2025
1 parent 6d20f24 commit f77aded
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inc/Engine/Cache/TaxonomySubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ private function is_not_valid_taxonomy_page() {

$term_link = urldecode( untrailingslashit( $term_link ) );

if ( $term_link !== urldecode( untrailingslashit( $current_link ) ) ) {
$current_link = home_url( add_query_arg( [], wp_unslash( $_SERVER['REQUEST_URI'] ) ?? '' ) );
if ( urldecode( untrailingslashit( $current_link ) ) !== $term_link && ! empty( $_SERVER['REQUEST_URI'] ) ) {
$current_link = home_url( add_query_arg( [], wp_unslash( $_SERVER['REQUEST_URI'] ) ?? '' ) );// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized

Check failure on line 75 in inc/Engine/Cache/TaxonomySubscriber.php

View workflow job for this annotation

GitHub Actions / WPRocket lint with PHP Stan. PHP 8.4 on ubuntu-latest.

Expression on left side of ?? is not nullable.
}

return $term_link !== urldecode( untrailingslashit( $current_link ) );
return urldecode( untrailingslashit( $current_link ) ) !== $term_link;
}
}

0 comments on commit f77aded

Please sign in to comment.