#45204 closed defect (bug) (fixed)
Fix a broken link for esc_like() in the wpdb->prepare() DocBlock
| Reported by: | DrewAPicture | Owned by: | antaltettinger |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.1 |
| Component: | Database | Version: | |
| Severity: | normal | Keywords: | good-first-bug has-patch commit |
| Cc: | Focuses: | docs |
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
@
8 years ago
- Keywords has-patch added
- Owner set to
- Status new → 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
@
8 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.