Ticket #6539: 6539.patch

File 6539.patch, 0.6 kB (added by tenpura, 3 months ago)

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

  • wp-includes/query.php

    old new  
    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));