[wp-trac] [WordPress Trac] #41562: PHP 7.2: create_function deprecation in \Gettext_Translations class
WordPress Trac
noreply at wordpress.org
Wed Oct 4 01:30:01 UTC 2017
#41562: PHP 7.2: create_function deprecation in \Gettext_Translations class
----------------------------+---------------------
Reporter: ayeshrajans | Owner: pento
Type: task (blessed) | Status: closed
Priority: normal | Milestone: 4.9
Component: I18N | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses:
----------------------------+---------------------
Changes (by pento):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"41722"]:
{{{
#!CommitTicketReference repository="" revision="41722"
I18N: Introduce the `Plural_Forms` class.
Historically, we've evaluated the plural forms for each language using
`create_function()`. This is being deprecated in PHP 7.2, so needs to be
replaced.
The `Plural_Forms` class parses the `Plural-Forms` header from the PO
file, and internally caches the result of all subsequent plural form
tests, allowing it to match the performance of the existing code.
Props rmccue.
Fixes #41562.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41562#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list