mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Database: Don't quote placeholders in queries going through $wpdb->prepare()
To bring Core into line with the changes to `$wpdb->prepare()` in WordPress 4.8.2, query placeholders shouldn't be quoted. Props jrf, johnjamesjacoby. Fixes #41983. git-svn-id: https://develop.svn.wordpress.org/trunk@41628 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1267,7 +1267,7 @@ class wpdb {
|
||||
* $wild = '%';
|
||||
* $find = 'only 43% of planets';
|
||||
* $like = $wild . $wpdb->esc_like( $find ) . $wild;
|
||||
* $sql = $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE post_content LIKE '%s'", $like );
|
||||
* $sql = $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE post_content LIKE %s", $like );
|
||||
*
|
||||
* Example Escape Chain:
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user