Notice fixing for wp-includes. See #5607 props filosofo.

git-svn-id: https://develop.svn.wordpress.org/trunk@6592 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood
2008-01-10 20:51:07 +00:00
parent 0480fcbf68
commit 90e193bdab
8 changed files with 46 additions and 29 deletions
+2 -2
View File
@@ -142,7 +142,7 @@ function _get_page_link( $id = false ) {
$pagestruct = $wp_rewrite->get_page_permastruct();
if ( '' != $pagestruct && 'draft' != $post->post_status ) {
if ( '' != $pagestruct && isset($post->post_status) && 'draft' != $post->post_status ) {
$link = get_page_uri($id);
$link = str_replace('%pagename%', $link, $pagestruct);
$link = get_option('home') . "/$link";
@@ -597,7 +597,7 @@ function get_pagenum_link($pagenum = 1) {
$request = remove_query_arg( 'paged' );
$home_root = parse_url(get_option('home'));
$home_root = $home_root['path'];
$home_root = ( isset($home_root['path']) ) ? $home_root['path'] : '';
$home_root = preg_quote( trailingslashit( $home_root ), '|' );
$request = preg_replace('|^'. $home_root . '|', '', $request);