WordPress.org

Make WordPress Core

Ticket #9788: 9788.diff

File 9788.diff, 571 bytes (added by Denis-de-Bernardy, 5 years ago)
  • wp-includes/post-template.php

     
    199199        else 
    200200                $file = $pagenow; //$_SERVER['PHP_SELF']; 
    201201 
    202         if ( $page > count($pages) ) // if the requested page doesn't exist 
     202        if ( !$multipage ) 
     203                $page = 1; 
     204        elseif ( $page > count($pages) ) // if the requested page doesn't exist 
    203205                $page = count($pages); // give them the highest numbered page that DOES exist 
    204206 
    205207        $content = $pages[$page-1];