Skip to content

Commit 9c973d2

Browse files
committed
Only pass real integer values unquoted
1 parent 37fba95 commit 9c973d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Search_Replace_Command.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,8 +657,8 @@ private static function esc_sql_ident( $idents ) {
657657
*/
658658
private static function esc_sql_value( $values ) {
659659
$quote = function ( $v ) {
660-
// Don't quote numeric values to avoid MySQL's implicit type conversion.
661-
if ( is_numeric( $v ) ) {
660+
// Don't quote integer values to avoid MySQL's implicit type conversion.
661+
if ( (string)(int) $v === (string) $v ) {
662662
return esc_sql( $v );
663663
}
664664

0 commit comments

Comments
 (0)