Make WordPress Core

Opened 19 years ago

Closed 19 years ago

#5159 closed defect (bug) (fixed)

Patch prevents an Undefined Variable error in get_attachment_icon()

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

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

Download all attachments as: .zip

Change History (7)

@richcon
19 years ago

Patch to wp-includes/post-template.php

#1 @Viper007Bond
19 years ago

  • Keywords has-patch commit added
  • Milestone 2.5 → 2.3.1

#2 @westi
19 years ago

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

#3 @westi
19 years ago

  • Resolution → fixed
  • Status assigned → closed

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

#4 follow-up: @westi
19 years ago

  • Milestone 2.4 → 2.3.1
  • Resolution fixed
  • Status closed → reopened

Reopening for 2.3.1 consideration.

#5 in reply to: ↑ 4 @westi
19 years ago

  • Priority normal → low
  • Severity normal → 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
19 years ago

  • Milestone 2.3.1 → 2.4
  • Resolution → fixed
  • Status reopened → closed
Note: See TracTickets for help on using tickets.