[wp-trac] [WordPress Trac] #56980: Check that the Normalizer class exists in remove_accents()
WordPress Trac
noreply at wordpress.org
Thu Nov 3 11:31:14 UTC 2022
#56980: Check that the Normalizer class exists in remove_accents()
----------------------------+-----------------------
Reporter: SergeyBiryukov | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.1.1
Component: Formatting | Version:
Severity: normal | Keywords: has-patch
Focuses: |
----------------------------+-----------------------
Background: #24661, #30130, #35951, #47763, #52654.
After the 6.1 release, seeing a few errors like this on support forums and
Google search results:
{{{
Uncaught Error: Class 'Normalizer' not found in .../wp-
includes/formatting.php:1605
}}}
Introduced in [53754]. There is a `function_exists( 'normalizer_normalize'
)` check, but apparently some plugins polyfill that function while the
`Normalizer` class is still not available, see comment:22:ticket:35951.
This can happen when the `intl` PHP extension is not loaded.
I believe we should add a `class_exists( 'Normalizer' )` check here.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56980>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list