Make WordPress Core

Opened 11 years ago

Closed 11 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:


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 11 years ago.
Patch to wp-includes/post-template.php

Download all attachments as: .zip

Change History (7)

11 years ago

Patch to wp-includes/post-template.php

#1 @Viper007Bond
11 years ago

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

#2 @westi
11 years ago

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

#3 @westi
11 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.

#4 follow-up: @westi
11 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.

#5 in reply to: ↑ 4 @westi
11 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.

#6 @foolswisdom
11 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.