Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#23728 closed defect (bug) (invalid)

Errors when trying to upload media before saving network settings

Reported by: wp4j's profile wp4j Owned by:
Milestone: Priority: normal
Severity: major Version:
Component: Multisite Keywords: reporter-feedback
Focuses: Cc:

Description

foreach warning due to unpopulated $mimes array and denial of uploads even when file types defined in network admin settings. This seems to happen because there is a disconnect between the defaults and what is actually present in the db (before the first save).

Should be noted that the site was installed programmatically using wp_install() so this may have something to do with it. I am giving this a major severity because the server path is disclosed from the foreach warning and the least that should be done is do an is_array() check on that $mime var and give a meaningful message stating that there are no mimes defined or something...

Change History (5)

#1 @SergeyBiryukov
12 years ago

  • Component changed from General to Multisite
  • Keywords reporter-feedback added

Should be noted that the site was installed programmatically using wp_install() so this may have something to do with it.

Could you provide a piece of code to reproduce the issue?

#2 @nacin
12 years ago

And please provide the full error (including file, line number) and/or full call stack.

#3 @wp4j
12 years ago

Warning: Invalid argument supplied for foreach() in /wordpress/wp-includes/functions.php on line 1793

#4 @jeremyfelt
12 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

In current trunk, an error on this line implies there may have been an incorrect filter applied to ext2type. Closing, but feel free to reopen if code can be provided to reproduce the issue.

#5 @SergeyBiryukov
12 years ago

  • Keywords reporter-feedback added
Note: See TracTickets for help on using tickets.