WordPress.org

Make WordPress Core

Opened 10 months ago

Last modified 9 months ago

#45694 reviewing defect (bug)

Undefined Index: caption_id

Reported by: Soben Owned by: SergeyBiryukov
Milestone: Future Release Priority: normal
Severity: normal Version: 5.0.1
Component: Media Keywords: has-patch reporter-feedback
Focuses: Cc:
PR Number:

Description

Discovered this randomly on a local project.

Notice: Undefined index: caption_id in /var/www/html/wp-includes/media.php on line 1572

Discovered with PHP 7.2.10 and WordPress 5.0.1

It's just a warning but one nonetheless.

Attached will be the patch.

Attachments (1)

45694.patch (522 bytes) - added by Soben 10 months ago.

Download all attachments as: .zip

Change History (4)

@Soben
10 months ago

#1 @swissspidy
10 months ago

  • Component changed from General to Media

#2 @SergeyBiryukov
10 months ago

  • Milestone changed from Awaiting Review to 5.1
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#3 @pento
9 months ago

  • Keywords reporter-feedback added
  • Milestone changed from 5.1 to Future Release

@Soben: Do you have more information about how to reproduce this? $atts['caption_id'] should at least be set to an empty string by shortcode_atts().

Note: See TracTickets for help on using tickets.