Make WordPress Core

Opened 10 years ago

Closed 10 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's profile stevegrunwell Owned by: drewapicture's profile DrewAPicture
Milestone: 4.1 Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch
Focuses: docs Cc:

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 10 years ago.
Remove the @return values for add_image_size() and set_post_thumbnail_size().

Download all attachments as: .zip

Change History (4)

@stevegrunwell
10 years ago

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

#1 @stevegrunwell
10 years ago

  • Keywords has-patch added

#2 @DrewAPicture
10 years ago

  • Component changed from General to Media
  • Milestone changed from Awaiting Review to 4.1

Hi Steve, thanks for the patch!

#3 @DrewAPicture
10 years ago

  • Owner set to DrewAPicture
  • Resolution set to fixed
  • Status changed from new to 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.