#45204 closed defect (bug) (fixed)
Fix a broken link for esc_like() in the wpdb->prepare() DocBlock
Reported by: | DrewAPicture | Owned by: | antaltettinger |
---|---|---|---|
Milestone: | 5.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Database | Keywords: | good-first-bug has-patch commit |
Focuses: | docs | Cc: |
Description (last modified by )
As reported by @timhavinga, the esc_like()
reference in the fourth paragraph of the DocBlock description for wpdb->prepare()
is invalid. It should point to to the wpdb->esc_like()
method, vs a (nonexistent) standalone function.
The DocBlock description for a function, class, method, or hook corresponds to the Description section of the reference article for that element when it's parsed from source. So to reference a class method in a DocBlock with an inline @see
tag, the format is {@see Class_Name::method_name()}
Current docs:
<?php * ... * * Literal percentage signs (%) in the query string must be written as %%. Percentage wildcards (for example, * to use in LIKE syntax) must be passed via a substitution argument containing the complete LIKE string, these * cannot be inserted directly in the query string. Also see {@see esc_like()}. * * ... */ public function prepare( $query, $args ) { ...
Attachments (2)
Change History (9)
#3
@
6 years ago
- Keywords has-patch added
- Owner set to antaltettinger
- Status changed from new to assigned
Hi @antaltettinger, thanks for the patch. Unfortunately, it's not quite the fix we need.
Based on the second paragraph of the ticket description, all we really need to do is update the inline @see
tag to match the {@see Class_Name::method_name()}
syntax.
---
Assigning to mark the good-first-bug
ticket as "claimed".
#4
@
6 years ago
Hi @DrewAPicture! Thank you very much for your quick reply. I have modified and uploaded the (hopefully) correct file. Thanks for the support, it's my first time to contribute on Track so it's testing waters for me.
#5
@
6 years ago
- Keywords commit added
- Milestone changed from Future Release to 5.1
Hi @antaltettinger, that's exactly what I was looking for. Looks great!
Trunk development is still closed, but we'll get this one merged, probably as part of the 5.1 release when that opens back up again.
Thanks for the patch!
Note: I've manually fixed the link in the Code Reference on a temporary basis pending a fix against the 5.1 milestone once trunk development reopens.