WordPress.org

Make WordPress Core

Changeset 28268


Ignore:
Timestamp:
05/06/2014 04:21:35 AM (7 years ago)
Author:
wonderboymusic
Message:

Dead code in wp-admin/includes/file.php:

  • In wp_handle_upload() and wp_handle_sideload(), $ext gets conditionally reset... and then is never used.
  • In request_filesystem_credentials(), $password is initialized as an empty string. The variable is never used.

See #27882.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/file.php

    r27938 r28268  
    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'];
     
    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.' ));
    436 
    437         if ( !$ext )
    438             $ext = ltrim(strrchr($file['name'], '.'), '.');
    439433
    440434        if ( !$type )
     
    10631057    $hostname = '';
    10641058    $username = '';
    1065     $password = '';
    10661059    $connection_type = '';
    10671060    if ( !empty($credentials) )
Note: See TracChangeset for help on using the changeset viewer.