Make WordPress Core

Opened 5 months ago

Closed 5 months ago

Last modified 3 months ago

#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)

65470.patch​ (956 bytes ) - added by nareshbheda 5 months ago.

Download all attachments as: .zip

Change History (6)

This ticket was mentioned in ​PR #12190 on ​WordPress/wordpress-develop by ​@manishxdp.


5 months ago
#1

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

#2 @SergeyBiryukov
5 months ago

  • Milestone Awaiting Review → 7.1

#3 @SergeyBiryukov
5 months ago

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

In 62527:

Docs: Correct variable reference in wpdb::delete() DocBlock.

Follow-up to [47740].

Props nareshbheda, manishxdp.
Fixes #65470.

This ticket was mentioned in ​PR #12221 on ​WordPress/wordpress-develop by ​@orionaselite.


5 months ago
#4

## Summary
Corrects grammar in docblocks for , , and by changing "each of the value" to "each of the values", matching the existing wording in and .

This is a follow-up to [62527] / #65470.

Props George Nicolaou.
Fixes #[ticket-number-needed].

​@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.

Note: See TracTickets for help on using tickets.