[wp-trac] [WordPress Trac] #54229: Make dashboard widget control submit text filterable or change to "Save changes"

WordPress Trac noreply at wordpress.org
Fri Nov 5 12:17:46 UTC 2021


#54229: Make dashboard widget control submit text filterable or change to "Save
changes"
------------------------------+-----------------------------
 Reporter:  zodiac1978        |       Owner:  hellofromTonya
     Type:  enhancement       |      Status:  closed
 Priority:  normal            |   Milestone:  5.9
Component:  Administration    |     Version:
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:  ui-copy
------------------------------+-----------------------------

Comment (by hellofromTonya):

 In [changeset:"52019" 52019]:
 {{{
 #!CommitTicketReference repository="" revision="52019"
 Code Modernization: Pass correct default value to `http_build_query()` in
 `get_core_checksums()` and `wp_version_check()`.

 The `get_core_checksums()` and `wp_version_check()` functions call the PHP
 native `http_build_query()` function, the second parameter of which is the
 ''optional'' `$numeric_prefix` parameter which expects a non-nullable
 `string`.

 A parameter being optional, however, does not automatically make it
 nullable.

 As of PHP 8.1, passing `null` to a non-nullable PHP native function will
 generate a deprecation notice.

 In this case, this function call yielded a `http_build_query(): Passing
 null to parameter #2 ($numeric_prefix) of type string is deprecated`
 notice.

 Changing the `null` to an empty string fixes this without a backward
 compatibility break.

 References:
 * [https://www.php.net/manual/en/function.http-build-query.php PHP Manual:
 http_build_query()]
 * [https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg PHP RFC:
 Deprecate passing null to non-nullable arguments of internal functions]

 Follow-up to [18697], [25540].

 Props bjorsch, kraftbj, hellofromTonya, jrf.
 See #54229.
 }}}

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


More information about the wp-trac mailing list