mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 15:47:38 +02:00
Database: Use a strict comparison for has_filter()
check in wpdb::placeholder_escape()
.
The filter is added with a priority of `0`, so a loose comparison had an unintended effect of adding the filter on every call. Props withinboredom. Fixes #47430. Built from https://develop.svn.wordpress.org/trunk@45707 git-svn-id: http://core.svn.wordpress.org/trunk@45518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5f9ba92af4
commit
2d574d673f
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.3-alpha-45706';
|
$wp_version = '5.3-alpha-45707';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
@ -2092,7 +2092,7 @@ class wpdb {
|
|||||||
* Add the filter to remove the placeholder escaper. Uses priority 0, so that anything
|
* Add the filter to remove the placeholder escaper. Uses priority 0, so that anything
|
||||||
* else attached to this filter will receive the query with the placeholder string removed.
|
* else attached to this filter will receive the query with the placeholder string removed.
|
||||||
*/
|
*/
|
||||||
if ( ! has_filter( 'query', array( $this, 'remove_placeholder_escape' ) ) ) {
|
if ( false === has_filter( 'query', array( $this, 'remove_placeholder_escape' ) ) ) {
|
||||||
add_filter( 'query', array( $this, 'remove_placeholder_escape' ), 0 );
|
add_filter( 'query', array( $this, 'remove_placeholder_escape' ), 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user