WordPress.org

Make WordPress Core

Ticket #6206: 6206-warning.diff

File 6206-warning.diff, 569 bytes (added by andy, 7 years ago)

default case comes last

  • wp-admin/media.php

     
    88wp_reset_vars(array('action')); 
    99 
    1010switch( $action ) : 
    11 case 'upload' : 
    12 case 'delete' : break; // stubs 
    1311case 'editattachment' : 
    1412        $errors = media_upload_form_handler(); 
    1513        if ( empty($errors) ) { 
     
    7876 
    7977        require( 'admin-footer.php' ); 
    8078 
    81         break; 
     79        exit; 
     80 
     81default: 
     82        wp_redirect( 'upload.php' ); 
     83        exit; 
     84 
    8285endswitch; 
    8386 
    84 wp_redirect( 'upload.php' ); 
    85 exit; 
    8687 
    8788?>