diff --git a/wp-includes/class-wpdb.php b/wp-includes/class-wpdb.php index 22c54e75ee..1c7899a9ad 100644 --- a/wp-includes/class-wpdb.php +++ b/wp-includes/class-wpdb.php @@ -1562,7 +1562,7 @@ class wpdb { $type = substr( $placeholder, -1 ); if ( 'f' === $type && true === $this->allow_unsafe_unquoted_parameters - && 0 === substr_compare( $split_query[ $key - 1 ], '%', -1, 1 ) + && '%' === substr( $split_query[ $key - 1 ], -1, 1 ) ) { /* @@ -1623,7 +1623,7 @@ class wpdb { * Second, if "%s" has a "%" before it, even if it's unrelated (e.g. "LIKE '%%%s%%'"). */ if ( true !== $this->allow_unsafe_unquoted_parameters - || ( '' === $format && 0 !== substr_compare( $split_query[ $key - 1 ], '%', -1, 1 ) ) + || ( '' === $format && '%' !== substr( $split_query[ $key - 1 ], -1, 1 ) ) ) { $placeholder = "'%" . $format . "s'"; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 47c8298d3d..577f54485b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-alpha-55157'; +$wp_version = '6.2-alpha-55158'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.