Undo pre-doublequoting in prepare(). Props JeremyVisser. see #4553
git-svn-id: http://svn.automattic.com/wordpress/trunk@5791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
97daaa0d03
commit
76ed1bdad8
|
@ -132,7 +132,8 @@ class wpdb {
|
||||||
return;
|
return;
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$query = array_shift($args);
|
$query = array_shift($args);
|
||||||
$query = str_replace("'%s'", '%s', $query); // in case someone mistakenly already quoted it
|
$query = str_replace("'%s'", '%s', $query); // in case someone mistakenly already singlequoted it
|
||||||
|
$query = str_replace('"%s"', '%s', $query); // doublequote unquoting
|
||||||
$query = str_replace('%s', "'%s'", $query); // quote the strings
|
$query = str_replace('%s', "'%s'", $query); // quote the strings
|
||||||
array_walk($args, array(&$this, 'escape_by_ref'));
|
array_walk($args, array(&$this, 'escape_by_ref'));
|
||||||
return @vsprintf($query, $args);
|
return @vsprintf($query, $args);
|
||||||
|
|
Loading…
Reference in New Issue