mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-admin.
See #47632. git-svn-id: https://develop.svn.wordpress.org/trunk@45583 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -821,7 +821,8 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
|
||||
* A writable uploads dir will pass this test. Again, there's no point
|
||||
* overriding this one.
|
||||
*/
|
||||
if ( ! ( ( $uploads = wp_upload_dir( $time ) ) && false === $uploads['error'] ) ) {
|
||||
$uploads = wp_upload_dir( $time );
|
||||
if ( ! ( $uploads && false === $uploads['error'] ) ) {
|
||||
return call_user_func_array( $upload_error_handler, array( &$file, $uploads['error'] ) );
|
||||
}
|
||||
|
||||
@@ -1251,7 +1252,8 @@ function verify_file_signature( $filename, $signatures, $filename_for_errors = f
|
||||
|
||||
mbstring_binary_safe_encoding();
|
||||
|
||||
$skipped_key = $skipped_signature = 0;
|
||||
$skipped_key = 0;
|
||||
$skipped_signature = 0;
|
||||
|
||||
foreach ( (array) $signatures as $signature ) {
|
||||
$signature_raw = base64_decode( $signature );
|
||||
@@ -1432,7 +1434,8 @@ function _unzip_file_ziparchive( $file, $to, $needed_dirs = array() ) {
|
||||
$uncompressed_size = 0;
|
||||
|
||||
for ( $i = 0; $i < $z->numFiles; $i++ ) {
|
||||
if ( ! $info = $z->statIndex( $i ) ) {
|
||||
$info = $z->statIndex( $i );
|
||||
if ( ! $info ) {
|
||||
return new WP_Error( 'stat_failed_ziparchive', __( 'Could not retrieve file from archive.' ) );
|
||||
}
|
||||
|
||||
@@ -1447,10 +1450,12 @@ function _unzip_file_ziparchive( $file, $to, $needed_dirs = array() ) {
|
||||
|
||||
$uncompressed_size += $info['size'];
|
||||
|
||||
$dirname = dirname( $info['name'] );
|
||||
|
||||
if ( '/' === substr( $info['name'], -1 ) ) {
|
||||
// Directory.
|
||||
$needed_dirs[] = $to . untrailingslashit( $info['name'] );
|
||||
} elseif ( '.' !== $dirname = dirname( $info['name'] ) ) {
|
||||
} elseif ( '.' !== $dirname ) {
|
||||
// Path to a file.
|
||||
$needed_dirs[] = $to . untrailingslashit( $dirname );
|
||||
}
|
||||
@@ -1496,7 +1501,8 @@ function _unzip_file_ziparchive( $file, $to, $needed_dirs = array() ) {
|
||||
unset( $needed_dirs );
|
||||
|
||||
for ( $i = 0; $i < $z->numFiles; $i++ ) {
|
||||
if ( ! $info = $z->statIndex( $i ) ) {
|
||||
$info = $z->statIndex( $i );
|
||||
if ( ! $info ) {
|
||||
return new WP_Error( 'stat_failed_ziparchive', __( 'Could not retrieve file from archive.' ) );
|
||||
}
|
||||
|
||||
@@ -1829,7 +1835,8 @@ function get_filesystem_method( $args = array(), $context = '', $allow_relaxed_f
|
||||
if ( $temp_handle ) {
|
||||
|
||||
// Attempt to determine the file owner of the WordPress files, and that of newly created files
|
||||
$wp_file_owner = $temp_file_owner = false;
|
||||
$wp_file_owner = false;
|
||||
$temp_file_owner = false;
|
||||
if ( function_exists( 'fileowner' ) ) {
|
||||
$wp_file_owner = @fileowner( __FILE__ );
|
||||
$temp_file_owner = @fileowner( $temp_file_name );
|
||||
|
||||
Reference in New Issue
Block a user