WordPress.org

Make WordPress Core

Changeset 4228


Ignore:
Timestamp:
09/25/2006 01:55:41 AM (14 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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];
Note: See TracChangeset for help on using the changeset viewer.