#65470 closed defect (bug) (fixed)
Fix incorrect variable reference in wpdb::delete() DocBlock
| Reported by: | nareshbheda | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.1 |
| Component: | Database | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | docs |
Description
The DocBlock for wpdb::delete() incorrectly refers to $data in the $where_format parameter description.
The delete() method does not have a $data parameter. Its parameters are $table, $where, and $where_format.
Current text:
If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
This should refer to $where instead:
If omitted, all values in $where will be treated as strings unless otherwise specified in wpdb::$field_types.
Attachments (1)
Change History (6)
This ticket was mentioned in PR #12190 on WordPress/wordpress-develop by @manishxdp.
5 months ago
#1
This ticket was mentioned in PR #12221 on WordPress/wordpress-develop by @orionaselite.
5 months ago
#4
@orionaselite commented on PR #12221:
3 months ago
#5
Thanks for reviewing this. I searched class-wpdb.php for this repeated singular wording. The outdated branch contained three affected occurrences—on the shared helper, insert(), and replace() docblocks—and this PR corrects all three to “each of the values.” I did not treat that targeted search as a complete grammar audit of the entire file, so I have kept the PR scoped to the repeated issue I could verify.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Fixes #65470.
The wpdb::delete() DocBlock incorrectly refers to $data in the description of the $where_format parameter. Since wpdb::delete() does not have a $data parameter, the reference should be $where.
This change updates the DocBlock to correctly reference $where.
Ticket trac - https://core.trac.wordpress.org/ticket/65470