From 4fd7b2fd8ba233fa83eabf2857f25f65f8283ed3 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 20 Nov 2009 19:46:10 +0000 Subject: [PATCH] Fix warnings git-svn-id: https://develop.svn.wordpress.org/trunk@12246 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/media.php | 3 ++- wp-admin/includes/post.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index f5a3a11770..3a0a3ef087 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -1230,6 +1230,7 @@ function get_media_item( $attachment_id, $args = null ) { $delete = ''; } + $thumbnail = ''; if ( 'image' == $type && current_theme_supports( 'post-thumbnails' ) && get_post_image_id($_GET['post_id']) != $attachment_id ) $thumbnail = "" . esc_html__( "Use as thumbnail" ) . ""; @@ -1873,7 +1874,7 @@ foreach ($arc_result as $arc_row) { continue; $arc_row->mmonth = zeroise( $arc_row->mmonth, 2 ); - if ( $arc_row->yyear . $arc_row->mmonth == $_GET['m'] ) + if ( isset($_GET['m']) && ( $arc_row->yyear . $arc_row->mmonth == $_GET['m'] ) ) $default = ' selected="selected"'; else $default = ''; diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 7dc3c2a2e9..8829a7fa83 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -756,7 +756,7 @@ function _fix_attachment_links( $post_ID ) { function _fix_attachment_links_replace_cb($match) { global $_fix_attachment_link_id; - return stripslashes( 'href='.$m[1] ).get_attachment_link( $_fix_attachment_link_id ).stripslashes( $m[1] ); + return stripslashes( 'href='.$match[1] ).get_attachment_link( $_fix_attachment_link_id ).stripslashes( $match[1] ); } /**