Make WordPress Core

Changeset 4106


Ignore:
Timestamp:
08/18/2006 08:36:11 AM (20 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-template.php

    r4071 r4106  
    7676        else
    7777                $file = $pagenow; //$_SERVER['PHP_SELF'];
     78
     79        if ( $page > count($pages) ) // if the requested page doesn't exist
     80                $page = count($pages); // give them the highest numbered page that DOES exist
    7881
    7982        $content = $pages[$page-1];
Note: See TracChangeset for help on using the changeset viewer.