[wp-trac] [WordPress Trac] #56933: Unexpected quotes around search text in custom LIKE queries
WordPress Trac
noreply at wordpress.org
Mon Oct 31 20:38:35 UTC 2022
#56933: Unexpected quotes around search text in custom LIKE queries
-------------------------------------------------+-------------------------
Reporter: AlanP57 | Owner:
| hellofromTonya
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.1
Component: Database | Version: 6.1
Severity: normal | Resolution: fixed
Keywords: has-testing-info commit has-patch | Focuses:
has-unit-tests |
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):
* owner: (none) => hellofromTonya
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"54733" 54733]:
{{{
#!CommitTicketReference repository="" revision="54733"
Database: Revert [53575].
When using `'%%%s%%'` pattern with `$wpdb->prepare()`, it works on 6.0.3
but does not on 6.1-RC. Why? The inserted value is wrapped in quotes on
6.1-RC5 whereas it is not on <= 6.0.3.
With 6.1 final release tomorrow, more time is needed to further
investigate and test. Reverting this changeset to restore the previous
behavior.
This commit also adds a dataset for testing the `'%%%s%%'` pattern.
Props SergeyBiryukov, hellofromTonya, bernhard-reiter, desrosj,
davidbaumwald, jorbin.
Fixes #56933.
See #52506.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56933#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list