WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#14071 closed defect (bug) (fixed)

get_file_data() PHPDoc improvements

Reported by: hakre Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.0
Component: Inline Docs Keywords: needs-patch
Focuses: Cc:

Description

A parameter is named that does not exists. The function description contains information that is clear anyway (e.g. that a file will be opened for reading) or even wrong (that the function will load 1 or 2 kiB while it loads 8kiB).

Just ran over it and was in a mood of a quick patch.

Attachments (1)

14071.patch (2.0 KB) - added by hakre 5 years ago.

Download all attachments as: .zip

Change History (8)

@hakre5 years ago

comment:1 follow-up: @ocean905 years ago

  • Component changed from General to Inline Docs

comment:2 in reply to: ↑ 1 @hakre5 years ago

Replying to ocean90:
Ah, there it is. I was sure that there is a component but did not see it on creation.

comment:3 @hakre5 years ago

  • Version set to 3.0

comment:4 @nacin5 years ago

  • Milestone changed from Awaiting Review to 3.1

comment:5 @markjaquith4 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [16741]) Fix up the PHPdoc for get_file_data(). props hakre. fixes #14071

comment:6 @scribu4 years ago

  • Keywords needs-patch added; has-patch removed
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • @param array $default_headers array of regular expressions keyed with a fieldname, e.g. <code>array('Name' => 'Plugin Name')</code>

This is wrong. It's not an array of regular expressions, but of plain strings - preg_quote() is used on them.

comment:7 @scribu4 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.