Plugin Directory

Changeset 3462951


Ignore:
Timestamp:
02/16/2026 10:23:49 PM (6 weeks ago)
Author:
rationalwp
Message:

Fix: add phpcs:ignore for validated $_SERVER in sitemap

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rationalseo/trunk/includes/class-sitemap.php

    r3462943 r3462951  
    115115
    116116        // Fallback: check request URI directly in case rewrite rules are not flushed.
     117        // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- Validated with isset, unslashed, and sanitized.
    117118        $request_uri = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
    118119        $path        = trim( wp_parse_url( $request_uri, PHP_URL_PATH ), '/' );
     
    132133        // Fallback: match request URI directly if rewrite rules did not set query vars.
    133134        if ( empty( $sitemap ) ) {
     135            // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- Validated with isset, unslashed, and sanitized.
    134136            $request_uri = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
    135137            $path        = trim( wp_parse_url( $request_uri, PHP_URL_PATH ), '/' );
Note: See TracChangeset for help on using the changeset viewer.