WordPress.org

Make WordPress Core

Ticket #38119: 38119.2.diff

File 38119.2.diff, 621 bytes (added by PranaliPatel, 4 years ago)

Ignore the previous one.

  • wp-admin/includes/file.php

    diff --git wp-admin/includes/file.php wp-admin/includes/file.php
    index face916..b7fa48e 100644
    function _wp_handle_upload( &$file, $overrides, $time, $action ) { 
    361361         * A writable uploads dir will pass this test. Again, there's no point
    362362         * overriding this one.
    363363         */
    364         if ( ! ( ( $uploads = wp_upload_dir( $time ) ) && false === $uploads['error'] ) ) {
     364        if ( ! ( ( $uploads = wp_upload_dir( $time ) ) && ! empty( $uploads['error'] ) ) ) {
    365365                return call_user_func_array( $upload_error_handler, array( &$file, $uploads['error'] ) );
    366366        }
    367367