Ticket #7242 (closed defect: fixed)

Opened 5 months ago

Last modified 5 months ago

wp_get_attachment_thumb_url() back-compat with old format ".thumbnail" thumbnails broken

Reported by: DD32 Assigned to: anonymous
Priority: normal Milestone: 2.6
Component: Administration Version: 2.6
Severity: normal Keywords: has-patch
Cc:

Description

It appears that when using wp_get_attachment_thumb_url() for old attachments, Which use the "filename.thumbnail.jpg" format is broken, It cannot detect the thumbnail file, so returns a url to the fullsized image.

The bug is a 2-part:

  1. The $id of the attachment wanted is not passed to wp_get_attachment_thumb_file()
  2. The $thumb_file variable is not available in the 2nd part of the If at the time that PHP calls it, An extra compilation check needs to be done to make it available, Adding a set of brackets around it solves it.

Attachments

7242.diff (0.6 kB) - added by DD32 on 07/04/08 10:43:33.

Change History

07/04/08 10:43:33 changed by DD32

  • attachment 7242.diff added.

07/04/08 16:15:31 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [8257]) Fix wp_get_attachment_thumb_url() tumbnail back compat. Props DD32. fixes #7242