Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#30511 closed defect (bug) (fixed)

Remove inaccurate @return values for add_image_size() and set_post_thumbnail_size() in wp-includes/media.php

Reported by: stevegrunwell Owned by: DrewAPicture
Priority: normal Milestone: 4.1
Component: Media Version:
Severity: normal Keywords: has-patch
Cc: Focuses: docs

Description

The DocBlocks for bothadd_image_size() and set_post_thumbnail_size() have @return bool|array False, if no image was created. Metadata array on success., despite neither function returning any value. This appears to be a copy+paste error from image_make_intermediate_size(), which does return the values described.

Attachments (1)

30511.patch​ (1.1 KB ) - added by stevegrunwell 12 years ago.
Remove the @return values for add_image_size() and set_post_thumbnail_size().

Download all attachments as: .zip

Change History (4)

@stevegrunwell
12 years ago

Remove the @return values for add_image_size() and set_post_thumbnail_size().

#1 @stevegrunwell
12 years ago

  • Keywords has-patch added

#2 @DrewAPicture
12 years ago

  • Component General → Media
  • Milestone Awaiting Review → 4.1

Hi Steve, thanks for the patch!

#3 @DrewAPicture
12 years ago

  • Owner set to DrewAPicture
  • Resolution → fixed
  • Status new → closed

In 30633:

Remove return descriptions from the DocBlocks for add_image_size() and set_post_thumbnail_size() as they don't return anything.

Also document the $_wp_additional_image_sizes global, leveraged in add_image_size().

Props stevegrunwell.
Fixes #30511.

Note: See TracTickets for help on using tickets.