[wp-trac] [WordPress Trac] #62354: fetch_feed should use `get_bloginfo( 'charset' )` over `get_option( 'blog_charset' )` when setting the output encoding
WordPress Trac
noreply at wordpress.org
Mon Nov 11 17:54:02 UTC 2024
#62354: fetch_feed should use `get_bloginfo( 'charset' )` over `get_option(
'blog_charset' )` when setting the output encoding
-------------------------------------------------+-------------------------
Reporter: david.binda | Owner: desrosj
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.7
Component: Feeds | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses:
dev-reviewed |
-------------------------------------------------+-------------------------
Changes (by desrosj):
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"59383" 59383]:
{{{
#!CommitTicketReference repository="" revision="59383"
Feeds: Avoid fatal error with empty `blog_charset` value.
After the SimplePie library was updated to version `1.8.0` in [59141], an
edge case has been discovered where a fatal error can encountered if the
`blog_charset` option is missing or empty.
In `fetch_feed()`, this option is retrieved using `get_option()` instead
of `get_bloginfo( ‘charset’ )`. The latter will detect this scenario and
apply a default value of `UTF-8` and is already used interchangeably
throughout Core. This switches to `get_bloginfo( ‘charset’ )` instead to
prevent this edge case.
Reviewed by davidbaumwald.
Merges [59382] to the 6.7 branch.
Props david.binda, davidbaumwald, SergeyBiryukov, sabernhardt, azaozz,
peterwilsoncc.
Fixes #62354.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62354#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list