Make WordPress Core

Changeset 27319


Ignore:
Timestamp:
02/27/2014 09:15:31 PM (11 years ago)
Author:
SergeyBiryukov
Message:

Avoid an undefined index notice in wp_handle_upload().

props tivnet.
fixes #27225.

File:
1 edited

Legend:

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

    r27219 r27319  
    259259
    260260    // A successful upload will pass this test. It makes no sense to override this one.
    261     if ( $file['error'] > 0 )
    262         return call_user_func($upload_error_handler, $file, $upload_error_strings[$file['error']] );
     261    if ( isset( $file['error'] ) && $file['error'] > 0 ) {
     262        return call_user_func( $upload_error_handler, $file, $upload_error_strings[ $file['error'] ] );
     263    }
    263264
    264265    // A non-empty file will pass this test.
Note: See TracChangeset for help on using the changeset viewer.