#57323 closed defect (bug) (fixed)
get_settings_errors() inline docs return should reflect the array of arrays
| Reported by: | mcaskill | Owned by: | johnbillion |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.2 |
| Component: | Options, Meta APIs | Version: | 5.6 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: | docs |
Description
The function returns an array of setting error arrays but the inline doc suggests it returns only a single setting error array. This causes problems with static analysis tools and can be misinterpreted by developers.
This issue is present since 5.6: https://core.trac.wordpress.org/changeset/48760
Attachments (1)
Change History (5)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi @mcaskill, thanks for opening this ticket and well spotted!
Just a quick note that the
Versionproperty of tickets refers to the version that introduced the issue, which as you noted in the ticket description, was 5.6.While [48760] changed
@return arrayto add more detail, I agree that this could be clearer to avoid confusion.For others' reference, here's a sample return value of
get_settings_errors():The patch looks good to me. Adding for
commitconsideration.