Repository navigation
Commit e7709af
committed
Database: Add
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 WordPress/wordpress-develop#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-ce76da25c4cdNO_BACKSLASH_ESCAPES to wpdb::$incompatible_modes.1 parent 8588e2e commit e7709af
2 files changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
| 641 | + | |
641 | 642 | | |
642 | 643 | | |
643 | 644 | | |
| |||
648 | 649 | | |
649 | 650 | | |
650 | 651 | | |
| 652 | + | |
651 | 653 | | |
652 | 654 | | |
653 | 655 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments