Make WordPress Core


Ignore:
Timestamp:
07/01/2019 12:50:14 PM (6 years ago)
Author:
pento
Message:

Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-admin.

See #47632.

File:
1 edited

Legend:

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

    r45580 r45583  
    822822     * overriding this one.
    823823     */
    824     if ( ! ( ( $uploads = wp_upload_dir( $time ) ) && false === $uploads['error'] ) ) {
     824    $uploads = wp_upload_dir( $time );
     825    if ( ! ( $uploads && false === $uploads['error'] ) ) {
    825826        return call_user_func_array( $upload_error_handler, array( &$file, $uploads['error'] ) );
    826827    }
     
    12521253    mbstring_binary_safe_encoding();
    12531254
    1254     $skipped_key = $skipped_signature = 0;
     1255    $skipped_key       = 0;
     1256    $skipped_signature = 0;
    12551257
    12561258    foreach ( (array) $signatures as $signature ) {
     
    14331435
    14341436    for ( $i = 0; $i < $z->numFiles; $i++ ) {
    1435         if ( ! $info = $z->statIndex( $i ) ) {
     1437        $info = $z->statIndex( $i );
     1438        if ( ! $info ) {
    14361439            return new WP_Error( 'stat_failed_ziparchive', __( 'Could not retrieve file from archive.' ) );
    14371440        }
     
    14481451        $uncompressed_size += $info['size'];
    14491452
     1453        $dirname = dirname( $info['name'] );
     1454
    14501455        if ( '/' === substr( $info['name'], -1 ) ) {
    14511456            // Directory.
    14521457            $needed_dirs[] = $to . untrailingslashit( $info['name'] );
    1453         } elseif ( '.' !== $dirname = dirname( $info['name'] ) ) {
     1458        } elseif ( '.' !== $dirname ) {
    14541459            // Path to a file.
    14551460            $needed_dirs[] = $to . untrailingslashit( $dirname );
     
    14971502
    14981503    for ( $i = 0; $i < $z->numFiles; $i++ ) {
    1499         if ( ! $info = $z->statIndex( $i ) ) {
     1504        $info = $z->statIndex( $i );
     1505        if ( ! $info ) {
    15001506            return new WP_Error( 'stat_failed_ziparchive', __( 'Could not retrieve file from archive.' ) );
    15011507        }
     
    18301836
    18311837            // Attempt to determine the file owner of the WordPress files, and that of newly created files
    1832             $wp_file_owner = $temp_file_owner = false;
     1838            $wp_file_owner   = false;
     1839            $temp_file_owner = false;
    18331840            if ( function_exists( 'fileowner' ) ) {
    18341841                $wp_file_owner   = @fileowner( __FILE__ );
Note: See TracChangeset for help on using the changeset viewer.