Opened 19 years ago
Closed 19 years ago
#2902 closed defect (bug) (fixed)
WP_Die function for display errors
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.1 | Priority: | normal |
Severity: | normal | Version: | 2.0.3 |
Component: | Administration | Keywords: | i18n error UTF-8 charset bg|has-patch bg|needs-testing |
Focuses: | Cc: |
Description
If there are error breaks WP, like upgrade files without update DB, WP will use "die" function to display the localized error message, but this will display the message without selecting charset, so browsers will try to guess the right charset but they will filed, FireFox for example will display Arabic messages using Cyrillic charset!
WP_Die function display errors in nice page and set charset to UTF-8 in both HTTP and HTML headers, it's modify copy of "bail" function in wp-db.php which display DB errors.
To test the patch apply it and change $wp_db_version then go to admin.
Attachments (3)
Change History (8)
#3
@
19 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
In the last patch remove "$wpdb->show_errors" because it's for DB only. Put HTML code directly outside PHP code, this allow us using functions and "defines" and any PHP code, unfortunately, it means remove "wp_die" filter.
Are you have any solutions?
WP_Die function