WordPress.org

Make WordPress Core

Ticket #7389: wp_error_type.diff

File wp_error_type.diff, 750 bytes (added by filosofo, 7 years ago)
  • wp-admin/includes/media.php

     
    102102        $file = wp_handle_upload($_FILES[$file_id], $overrides); 
    103103 
    104104        if ( isset($file['error']) ) 
    105                 return new wp_error( 'upload_error', $file['error'] ); 
     105                return new WP_Error( 'upload_error', $file['error'] ); 
    106106 
    107107        $url = $file['url']; 
    108108        $type = $file['type']; 
     
    142142        $file = wp_handle_sideload($file_array, $overrides); 
    143143 
    144144        if ( isset($file['error']) ) 
    145                 return new wp_error( 'upload_error', $file['error'] ); 
     145                return new WP_Error( 'upload_error', $file['error'] ); 
    146146 
    147147        $url = $file['url']; 
    148148        $type = $file['type'];