WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#12278 closed defect (bug) (fixed)

3 year old bugs in wp-admin file uploading

Reported by: tychay Owned by:
Milestone: 3.0 Priority: normal
Severity: minor Version: 2.9.2
Component: Upload Keywords: has-patch
Focuses: Cc:

Description

They're relatively minor:

  • in media.php, $overrides was supposed to be a passable parameter (so it can be sent upstream to file.php) but Andy forgot to put it in.
  • in file.php, there are a number of $$ calls where call_user_func is more appropriate (after all, you can overrides with a object->method call, but that will break $$).
  • there is another bug in file.php where if it errors out before extract the wrong error handler may be called (if overridden). I DID NOT PATCH THIS, but I made a note of it int he comments.

Two patch files are attached

WordPress.com reference:
https://wpcom.automattic.com/changeset/22464
https://wpcom.automattic.com/changeset/22365

Attachments (3)

file.php.diff (3.5 KB) - added by tychay 5 years ago.
Patch to file.php
media.php.diff (938 bytes) - added by tychay 5 years ago.
patch to wp-admin/includes/media.php
12278.diff (5.0 KB) - added by ryan 5 years ago.

Download all attachments as: .zip

Change History (6)

@tychay5 years ago

Patch to file.php

@tychay5 years ago

patch to wp-admin/includes/media.php

comment:1 @dd325 years ago

  • Keywords has-patch added; file upload removed
  • Milestone changed from Unassigned to 3.0

Just a quick mention on the patch, You've got some WP.com specifics in there. (And that unfiltered_uploads check shouldnt need removing anymore, 2.8.5 removed unfiltered_uploads unless specifically enabled via a Define..)

@ryan5 years ago

comment:2 @ryan5 years ago

Updated patch.

comment:3 @ryan5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [13290]) Pass overrides. Allow ref array calling. Props tychay. fixes #12278

Note: See TracTickets for help on using tickets.