Repository navigation
Commit 6d003d6
Use the connection charset when stripping invalid text without a charset
When $wpdb->charset is empty and a value must be checked by the database,
wpdb::strip_invalid_text() falls back to mysqli_character_set_name(), which
fails with a TypeError for the SQLite driver. Use the emulated connection
charset (utf8mb4) instead.
This surfaced in Tests_DB_Charset::test_no_db_charset_defined once tables
with a non-UTF-8 DEFAULT CHARSET got their charset recorded correctly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 7cd15a0 commit 6d003d6
1 file changed
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
741 | 776 | | |
742 | 777 | | |
743 | 778 | | |
| |||
0 commit comments