Ticket #11608: 11608.diff
File 11608.diff, 665 bytes (added by , 15 years ago) |
---|
-
wp-includes/wp-db.php
562 562 $args = $args[0]; 563 563 $query = str_replace("'%s'", '%s', $query); // in case someone mistakenly already singlequoted it 564 564 $query = str_replace('"%s"', '%s', $query); // doublequote unquoting 565 $query = str_replace('%s', "'%s'", $query); // quote thestrings565 $query = preg_replace('|(?<!%)%s|', "'%s'", $query); //quote the strings, Avoiding escaped strings 566 566 array_walk($args, array(&$this, 'escape_by_ref')); 567 567 return @vsprintf($query, $args); 568 568 }