Make WordPress Core

Ticket #18991: 18991.matches.diff

File 18991.matches.diff, 1.5 KB (added by duck_, 15 years ago)
  • wp-includes/rewrite.php

     
    314314
    315315                if ( preg_match("!^$match!", $request_match, $matches) ) {
    316316
    317                         if ( $wp_rewrite->use_verbose_page_rules && preg_match( '/pagename=\$([^&\[]+)\[([0-9]+)\]/', $query, $varmatch ) ) {
     317                        if ( $wp_rewrite->use_verbose_page_rules && preg_match( '/pagename=\$matches\[([0-9]+)\]/', $query, $varmatch ) ) {
    318318                                // this is a verbose page match, lets check to be sure about it
    319                                 if ( ! get_page_by_path( ${$varmatch[1]}[$varmatch[2]] ) )
     319                                if ( ! get_page_by_path( $matches[ $varmatch[1] ] ) )
    320320                                        continue;
    321321                        }
    322322
  • wp-includes/class-wp.php

     
    201201                                        if ( preg_match("#^$match#", $request_match, $matches) ||
    202202                                                preg_match("#^$match#", urldecode($request_match), $matches) ) {
    203203
    204                                                 if ( $wp_rewrite->use_verbose_page_rules && preg_match( '/pagename=\$([^&\[]+)\[([0-9]+)\]/', $query, $varmatch ) ) {
     204                                                if ( $wp_rewrite->use_verbose_page_rules && preg_match( '/pagename=\$matches\[([0-9]+)\]/', $query, $varmatch ) ) {
    205205                                                        // this is a verbose page match, lets check to be sure about it
    206                                                         if ( ! get_page_by_path( ${$varmatch[1]}[$varmatch[2]] ) )
     206                                                        if ( ! get_page_by_path( $matches[ $varmatch[1] ] ) )
    207207                                                                continue;
    208208                                                }
    209209