From 2d574d673f4b4d201b6b9c5b17cd5791f4269eaf Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 1 Aug 2019 02:25:56 +0000 Subject: [PATCH] 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 --- wp-includes/version.php | 2 +- wp-includes/wp-db.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 618a91244d..7b7581510b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @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. diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 4f8223fc4b..98eba1bc29 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -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 ); }