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:
@@ -2092,7 +2092,7 @@ class wpdb {
|
||||
* 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.
|
||||
*/
|
||||
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 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user