WordPress.org

Make WordPress Core

Ticket #11184: 11184-cats-tags.patch

File 11184-cats-tags.patch, 783 bytes (added by nacin, 5 years ago)
  • wp-admin/edit-tags.php

     
    4444break; 
    4545 
    4646case 'delete': 
     47        if ( !isset( $_GET['tag_ID'] ) ) 
     48                wp_redirect('edit-tags.php'); 
     49 
    4750        $tag_ID = (int) $_GET['tag_ID']; 
    4851        check_admin_referer('delete-tag_' .  $tag_ID); 
    4952 
  • wp-admin/categories.php

     
    3434break; 
    3535 
    3636case 'delete': 
     37        if ( !isset( $_GET['cat_ID'] ) ) 
     38                wp_safe_redirect( wp_get_referer() ); 
     39 
    3740        $cat_ID = (int) $_GET['cat_ID']; 
    3841        check_admin_referer('delete-category_' .  $cat_ID); 
    3942