Stop PHP warnings when $_GET[revision] is not set. Props DD32, see #7437

git-svn-id: http://svn.automattic.com/wordpress/trunk@8508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2008-07-30 12:32:04 +00:00
parent 27b762bb8e
commit c61a4db3e5
2 changed files with 6 additions and 2 deletions

View File

@ -7,7 +7,9 @@ $messages[1] = sprintf( __( 'Post updated. Continue editing below or <a href="%s
$messages[2] = __('Custom field updated.');
$messages[3] = __('Custom field deleted.');
$messages[4] = __('Post updated.');
$messages[5] = sprintf( __('Post restored to revision from %s'), wp_post_revision_title( $_GET['revision'], false ) );
if ( isset($_GET['revision']) )
$messages[5] = sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) );
$notice = false;
$notices[1] = __( 'There is an autosave of this post that is more recent than the version below. <a href="%s">View the autosave</a>.' );

View File

@ -5,7 +5,9 @@ $messages[1] = sprintf( __( 'Page updated. Continue editing below or <a href="%s
$messages[2] = __('Custom field updated.');
$messages[3] = __('Custom field deleted.');
$messages[4] = __('Page updated.');
$messages[5] = sprintf( __('Page restored to revision from %s'), wp_post_revision_title( $_GET['revision'], false ) );
if ( isset($_GET['revision']) )
$messages[5] = sprintf( __('Page restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) );
$notice = false;
$notices[1] = __( 'There is an autosave of this page that is more recent than the version below. <a href="%s">View the autosave</a>.' );