WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#22465 closed defect (bug) (fixed)

Media uploader throws PHP notice if $_REQUEST[ 'post_id' ] is not set

Reported by: ldebrouwer Owned by: nacin
Milestone: 3.5 Priority: normal
Severity: trivial Version: 3.5
Component: Upload Keywords: has-patch commit
Focuses: Cc:

Description

When including the media uploader in the backend without setting $_REQUEST[ 'post_id' ] this will result in a PHP notice on line 1380 in /wp-admin/includes/media.php.

Attachments (1)

notice-be-gone.diff (1.3 KB) - added by ldebrouwer 5 years ago.
Fixed, plus it also avoids two similar instances of the same notice.

Download all attachments as: .zip

Change History (4)

@ldebrouwer
5 years ago

Fixed, plus it also avoids two similar instances of the same notice.

#1 @nacin
5 years ago

  • Keywords commit added; needs-testing removed
  • Milestone changed from Awaiting Review to 3.5

#2 @nacin
5 years ago

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

In 22628:

Prevent notices when post_id is not passed to the old media upload forms. props ldebrouwer. fixes #22465.

#3 @SergeyBiryukov
5 years ago

#22098 was marked as a duplicate.

Note: See TracTickets for help on using tickets.