Make WordPress Core

Ticket #62828: rewrite_path.patch

File rewrite_path.patch, 520 bytes (added by leedxw, 3 months ago)

Patch to rewrite.php to check for array

  • wp-includes/rewrite.php

    diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php
    index 235c0c82..a82c0471 100644
    a b function wp_resolve_numeric_slug_conflicts( $query_vars = array() ) { 
    412412
    413413        // This is the potentially clashing slug.
    414414        $value = '';
    415         if ( $compare && array_key_exists( $compare, $query_vars ) ) {
     415        if ( $compare && array_key_exists( $compare, $query_vars ) && ! is_array( $query_vars[ $compare ] ) ) {
    416416                $value = $query_vars[ $compare ];
    417417        }
    418418