WordPress.org

Make WordPress Core

Changeset 8508


Ignore:
Timestamp:
07/30/08 12:32:04 (6 years ago)
Author:
azaozz
Message:

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

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r8175 r8508  
    88$messages[3] = __('Custom field deleted.'); 
    99$messages[4] = __('Post updated.'); 
    10 $messages[5] = sprintf( __('Post restored to revision from %s'), wp_post_revision_title( $_GET['revision'], false ) ); 
     10 
     11if ( isset($_GET['revision']) ) 
     12    $messages[5] = sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ); 
    1113 
    1214$notice = false; 
  • trunk/wp-admin/edit-page-form.php

    r8506 r8508  
    66$messages[3] = __('Custom field deleted.'); 
    77$messages[4] = __('Page updated.'); 
    8 $messages[5] = sprintf( __('Page restored to revision from %s'), wp_post_revision_title( $_GET['revision'], false ) ); 
     8 
     9if ( isset($_GET['revision']) ) 
     10    $messages[5] = sprintf( __('Page restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ); 
    911 
    1012$notice = false; 
Note: See TracChangeset for help on using the changeset viewer.