#46666 closed defect (bug) (fixed)
Allow charset to be passed to the wp_die function
Reported by: | spacedmonkey | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Bootstrap/Load | Keywords: | good-first-bug has-patch has-dev-note |
Focuses: | Cc: |
Description
Currently, all the wp_die handlers, use (by guessing) the utf-8 charset. However, this is not allow this isn't allows the correct charset that the site uses. This charset is store in an option on the site. In wp_die
options can not be used, as wp_die
can be called if a database connection fails. But where wp_die
is called and there is a connection, charset could be passed as an arg.
Attachments (2)
Change History (11)
#1
@
6 years ago
Hi @spacedmonkey and @mohsinrasool. I'm a newbie just trying to learn my way around the contributions process. I like the changes you made @mohsinrasool. I wondered if charset needs a wp_die_handler to override the default handler for wp_die. @spacedmonkey, I'm not sure if this is what you meant by,
Currently, all the wp_die handlers, use (by guessing) the utf-8 charset.
This ticket was mentioned in Slack in #core by sergey. View the logs.
6 years ago
This ticket was mentioned in Slack in #core by desrosj. View the logs.
6 years ago
This ticket was mentioned in Slack in #core by mohsinrasool. View the logs.
5 years ago
#9
@
5 years ago
- Keywords has-dev-note added; 2nd-opinion removed
Mentioned in the Miscellaneous Developer Focused Changes dev note for 5.3: https://make.wordpress.org/core/2019/10/15/miscellaneous-developer-focused-changes-in-5-3/
Newbie here. I developed attached solution by editing functions.php. I tried to follow WordPress coding standard as much as I am aware of. Please guide me if I made any mistakes. Trunk patch is attached.