Commit e7709af3fc for wordpress.org

commit e7709af3fc68c800048fe4255dd5b85f0bcf2319
Author: tyxla <tyxla@git.wordpress.org>
Date:   Thu Oct 8 11:13:53 2026 +0000

    Database: Add `NO_BACKSLASH_ESCAPES` to `wpdb::$incompatible_modes`.

    When `NO_BACKSLASH_ESCAPES` is on, MySQL treats the backslash as a normal character instead of an escape character. WordPress relies on backslash escaping, so queries with escaped values can fail.

    `wpdb::set_sql_mode()` now removes this mode from the session, as it already does for the other incompatible modes. Sites that need the mode can still allow it with the `incompatible_sql_modes` filter.

    Includes an update to `test_set_incompatible_sql_mode()` to cover the new mode.

    Developed in https://github.com/WordPress/wordpress-develop/pull/13758.

    Props tyxla, mcsf, therssoftware.
    Fixes #66185.
    Built from https://develop.svn.wordpress.org/trunk@64240


    git-svn-id: http://core.svn.wordpress.org/trunk@63391 1a063a9b-81f0-0310-95a4-ce76da25c4cd

diff --git a/wp-includes/class-wpdb.php b/wp-includes/class-wpdb.php
index 869111efd0..96d2bafeed 100644
--- a/wp-includes/class-wpdb.php
+++ b/wp-includes/class-wpdb.php
@@ -638,6 +638,7 @@ class wpdb {
 	 * A list of incompatible SQL modes.
 	 *
 	 * @since 3.9.0
+	 * @since 7.2.0 Added `NO_BACKSLASH_ESCAPES`.
 	 *
 	 * @var string[]
 	 */
@@ -648,6 +649,7 @@ class wpdb {
 		'STRICT_ALL_TABLES',
 		'TRADITIONAL',
 		'ANSI',
+		'NO_BACKSLASH_ESCAPES',
 	);

 	/**
diff --git a/wp-includes/version.php b/wp-includes/version.php
index d867ab9b36..10b30f4173 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
  *
  * @global string $wp_version
  */
-$wp_version = '7.2-alpha-64239';
+$wp_version = '7.2-alpha-64240';

 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.