Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#29512 closed defect (bug) (fixed)

$site_mimes is not defined

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


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 9 years ago.
Define $site_mimes before using it
29512.2.diff (625 bytes) - added by rmccue 9 years ago.
Default upload_filetypes to the same as the admin
29512.3.diff (1.4 KB) - added by jeremyfelt 9 years ago.

Download all attachments as: .zip

Change History (9)

9 years ago

Define $site_mimes before using it

9 years ago

Default upload_filetypes to the same as the admin

#1 @rmccue
9 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
9 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to 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
9 years ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for 4.0.1 consideration.

9 years ago

#4 @jeremyfelt
9 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
9 years ago

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

#6 @jeremyfelt
9 years ago

  • Keywords fixed-major removed
  • Milestone changed from 4.0.1 to 4.1
  • Resolution set to fixed
  • Status changed from reopened to 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.