[wp-trac] [WordPress Trac] #56980: Check that the Normalizer class exists in remove_accents()
WordPress Trac
noreply at wordpress.org
Fri Nov 11 12:42:06 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 | Resolution:
Keywords: has-patch | Focuses:
----------------------------+---------------------
Comment (by SergeyBiryukov):
Replying to [comment:17 desrosj]:
> Replying to [comment:14 costdev]:
> > The patch looks good to me generally, though it seems to assume that
`normalizer_is_normalized()` exists if `normalizer_normalize()` exists.
The example polyfills check both, so we might consider this too.
>
> This came to mind for me as well. May be worthwhile to play it safe and
also check for `function_exists( 'normalizer_is_normalized' )` as well.
Thanks! Yes, that makes perfect sense to me. [attachment:"56980.4.diff"]
is a minor modification to check the functions in the same order as they
are called.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56980#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list