[wp-trac] [WordPress Trac] #55656: PHP 8.x: various compatibility fixes for WordPress 6.1

WordPress Trac noreply at wordpress.org
Wed Sep 28 22:17:52 UTC 2022


#55656: PHP 8.x: various compatibility fixes for WordPress 6.1
-------------------------------------------------+-------------------------
 Reporter:  hellofromTonya                       |       Owner:
                                                 |  SergeyBiryukov
     Type:  task (blessed)                       |      Status:  accepted
 Priority:  normal                               |   Milestone:  6.1
Component:  General                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  php8 php81 has-patch has-unit-tests  |     Focuses:  coding-
                                                 |  standards
-------------------------------------------------+-------------------------

Comment (by SergeyBiryukov):

 In [changeset:"54351" 54351]:
 {{{
 #!CommitTicketReference repository="" revision="54351"
 I18N: Use correct default value for JavaScript translations path.

 The `$path` parameter of some script translation functions had a default
 value of `null`, even though the parameter is documented as a string.

 This commit corrects the default value for `$path` in:
 * `WP_Dependency::set_translations()`
 * `WP_Scripts::set_translations()`
 * `wp_set_script_translations()`

 Additionally, this commit removes an `is_string()` check for `$path` in
 `load_script_textdomain()`. Now that the default value for `$path` in that
 function has also been corrected to an empty string instead of `null`,
 that check is no longer necessary, as it would ''hide'' an error which
 should be ''fixed'' (at the source of the problem) instead.

 Follow-up to [54349].

 Props jrf, johnjamesjacoby.
 See #55967, #55656.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55656#comment:52>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list