[wp-trac] [WordPress Trac] #56980: Check that the Normalizer class exists in remove_accents()
WordPress Trac
noreply at wordpress.org
Thu Nov 3 15:23:47 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 hellofromTonya):
Replying to [comment:6 SergeyBiryukov]:
> On a closer look, it appears that `Normalizer::FORM_C` is the default
value both for [https://www.php.net/manual/en/normalizer.isnormalized.php
normalizer_is_normalized()] and
[https://www.php.net/manual/en/normalizer.normalize.php
normalizer_normalize()], so perhaps we can just remove it. That way the
polyfilled function should work.
That's a good point! Core doesn't need to pass the default `$form` value
since both functions include the default in their function parameters.
Then if the `intl` package is not available, the polyfill handles it.
[attachment:"56980.2.diff"] should work.
@SergeyBiryukov how can this be tested?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56980#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list