Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#29512 closed defect (bug) (fixed)

$site_mimes is not defined

Reported by: rmccue Owned by: SergeyBiryukov
Priority: normal Milestone: 4.1
Component: Networks and Sites Version:
Severity: normal Keywords: has-patch
Cc: Focuses: multisite

Description

Error in the multisite tests:

Undefined variable: site_mimes

Naive patch attached. Might want to look into why $site_exts is empty though.

Attachments (3)

29512.diff​ (517 bytes ) - added by rmccue 12 years ago.
Define $site_mimes before using it
29512.2.diff​ (625 bytes ) - added by rmccue 12 years ago.
Default upload_filetypes to the same as the admin
29512.3.diff​ (1.4 KB ) - added by jeremyfelt 12 years ago.

Download all attachments as: .zip

Change History (9)

@rmccue
12 years ago

Define $site_mimes before using it

@rmccue
12 years ago

Default upload_filetypes to the same as the admin

#1 @rmccue
12 years ago

  • Keywords has-patch added

New patch uses jpg jpeg png gif as the default value, which matches the default for the option in Upload Settings (for the network).

#2 @SergeyBiryukov
12 years ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → closed

In 29718:

  • Declare $site_mimes before using it in check_upload_mimes().
  • Use the same default value for 'upload_filetypes' as on Network Settings screen.

props rmccue.
fixes #29512 for trunk.

#3 @SergeyBiryukov
12 years ago

  • Keywords fixed-major added
  • Resolution fixed
  • Status closed → reopened

Reopening for 4.0.1 consideration.

@jeremyfelt
12 years ago

#4 @jeremyfelt
12 years ago

29512.3.diff applies cleanly to the 4.0 branch.

This is clear to merge to 4.0 as there are no side effects. However this is not a regression from 3.9 so it could also stay as a trunk fix only.

I am able to reproduce the error in 4.0 unit tests, likely because of an option being stomped in a previous test.

#5 @helen
12 years ago

If there are no other changes in this file, it's better to leave it for 4.1.

#6 @jeremyfelt
12 years ago

  • Keywords fixed-major removed
  • Milestone 4.0.1 → 4.1
  • Resolution → fixed
  • Status reopened → closed

We *could* change the patch to only modify ms-functions.php, which will be changed in #29692, as the other part of the patch is really just a code style change.

That said, the worst this will do is cause a notice, and I haven't found a plausible real world scenario outside of the tests in 4.0.

So I'm going to close it as fixed in 4.1. :)

Note: See TracTickets for help on using tickets.