WordPress.org

Make WordPress Core

Ticket #6539: 6539.patch

File 6539.patch, 646 bytes (added by tenpura, 14 years ago)

Patch for 2.5 branch. Typecasts $reqpage to string to make the conditional work properly.

  • wp-includes/query.php

     
    920920                                        $reqpage = 0;
    921921                        }
    922922
    923                         if  ( ('page' != get_option('show_on_front') ) || ( $reqpage != get_option('page_for_posts') ) ) {
     923                        if  ( ('page' != get_option('show_on_front') ) || ( (string) $reqpage != get_option('page_for_posts') ) ) {
    924924                                $q['pagename'] = str_replace('%2F', '/', urlencode(urldecode($q['pagename'])));
    925925                                $page_paths = '/' . trim($q['pagename'], '/');
    926926                                $q['pagename'] = sanitize_title(basename($page_paths));