From 3583696de72a68f67d5226c26af35d84405104b7 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 25 Oct 2012 20:52:50 +0000 Subject: [PATCH] When replacing floats in wpdb::prepare(), avoid escaped placeholders (%%f). props SergeyBiryukov. fixes #19861. git-svn-id: https://develop.svn.wordpress.org/trunk@22304 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/wp-db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 466ab67b5e..1ca4c007c2 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -998,7 +998,7 @@ class wpdb { $args = $args[0]; $query = str_replace( "'%s'", '%s', $query ); // in case someone mistakenly already singlequoted it $query = str_replace( '"%s"', '%s', $query ); // doublequote unquoting - $query = str_replace( '%f' , '%F', $query ); // Force floats to be locale unaware + $query = preg_replace( '|(?