WordPress.org

Make WordPress Core

Ticket #27882: dead-code-admin-inc-file.diff

File dead-code-admin-inc-file.diff, 1.0 KB (added by wonderboymusic, 7 years ago)
  • src/wp-admin/includes/file.php

     
    294294                if ( ( !$type || !$ext ) && !current_user_can( 'unfiltered_upload' ) )
    295295                        return call_user_func($upload_error_handler, $file, __( 'Sorry, this file type is not permitted for security reasons.' ));
    296296
    297                 if ( !$ext )
    298                         $ext = ltrim(strrchr($file['name'], '.'), '.');
    299 
    300297                if ( !$type )
    301298                        $type = $file['type'];
    302299        } else {
     
    434431                if ( ( !$type || !$ext ) && !current_user_can( 'unfiltered_upload' ) )
    435432                        return $upload_error_handler( $file, __( 'Sorry, this file type is not permitted for security reasons.' ));
    436433
    437                 if ( !$ext )
    438                         $ext = ltrim(strrchr($file['name'], '.'), '.');
    439 
    440434                if ( !$type )
    441435                        $type = $file['type'];
    442436        }
     
    10621056        }
    10631057        $hostname = '';
    10641058        $username = '';
    1065         $password = '';
    10661059        $connection_type = '';
    10671060        if ( !empty($credentials) )
    10681061                extract($credentials, EXTR_OVERWRITE);