[wp-trac] [WordPress Trac] #42818: i18n Tools have PHP 7.2 compatibility issues
WordPress Trac
noreply at wordpress.org
Sat Jan 27 10:08:36 UTC 2018
#42818: i18n Tools have PHP 7.2 compatibility issues
--------------------------+------------------------------
Reporter: Otto42 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: I18N | Version: 4.9.1
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+------------------------------
Comment (by soulseekah):
Attached two patches that address the issue.
The first patch takes care of makepot.php, the create_function call there
simply wraps the input into curly braces, so the fix is simple - move to a
function of its own.
The second patch handles the two calls inside not-gettexted.php. Their
usage was is a bit tricker, relying on dynamic state, so the functionality
was moved into stateful classes, and a method is returned instead of a
function.
The second patch also fixes two test issues in not-gettexted:
1. A failing case in the replace test: http vs https URLs in the expected
result, seems like links to wordpress.org in PHP files were replaced to
their secure counterparts but the po/mos were not touched, so the
translation was not being found.
2. __construct vs setUp for initialization on the test case.
All tests pass with both patches applied.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42818#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list