WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#5159 closed defect (bug) (fixed)

Patch prevents an Undefined Variable error in get_attachment_icon()

Reported by: richcon Owned by: westi
Milestone: 2.5 Priority: low
Severity: minor Version: 2.3
Component: General Keywords: has-patch commit
Focuses: Cc:

Description

The included patch prevents an Undefined Variable E_NOTICE error from being triggered in get_attachment_icon()
(wp-includes/post-template.php)

On line 453:

$icon = "<img src='$src' title='$post_title' alt='$post_title' $constraint/>";

the variable $constraint is not defined if the icon's image fits within the allowed size.

Attachments (1)

post-template.php.diff (270 bytes) - added by richcon 7 years ago.
Patch to wp-includes/post-template.php

Download all attachments as: .zip

Change History (7)

@richcon7 years ago

Patch to wp-includes/post-template.php

comment:1 @Viper007Bond7 years ago

  • Keywords has-patch commit added
  • Milestone changed from 2.5 to 2.3.1

comment:2 @westi7 years ago

  • Milestone changed from 2.3.1 to 2.4
  • Owner changed from anonymous to westi
  • Status changed from new to assigned

comment:3 @westi7 years ago

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

(In [6201]) Define $constaint is all cases in get_attachment_icon() to fix E_NOTICE. Fixed #5159 props richcon.

comment:4 follow-up: @westi7 years ago

  • Milestone changed from 2.4 to 2.3.1
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for 2.3.1 consideration.

comment:5 in reply to: ↑ 4 @westi7 years ago

  • Priority changed from normal to low
  • Severity changed from normal to minor

Replying to westi:

Reopening for 2.3.1 consideration.

My personal opinion is that notice fixes are not severe enough to warrant fixing in a maintenance release.

comment:6 @foolswisdom7 years ago

  • Milestone changed from 2.3.1 to 2.4
  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.