Changeset 4228

Show
Ignore:
Timestamp:
09/25/06 01:55:41 (2 years ago)
Author:
ryan
Message:

Don't page off the end. Props Mark J. fixes #3039

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.0/wp-includes/template-functions-post.php

    r3486 r4228  
    7777    else 
    7878        $file = $pagenow; //$_SERVER['PHP_SELF']; 
     79 
     80    if ( $page > count($pages) ) // if the requested page doesn't exist 
     81        $page = count($pages); // give them the highest numbered page that DOES exist 
    7982 
    8083    $content = $pages[$page-1];