[wp-trac] [WordPress Trac] #58348: API Doc: replace wrong string[] type with correct one - array
WordPress Trac
noreply at wordpress.org
Thu May 18 05:19:42 UTC 2023
#58348: API Doc: replace wrong string[] type with correct one - array
-----------------------------+-----------------------------
Reporter: platonkristinin | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
Wordpress API docs have a lot of places where string[] type is present.
PHP doesn't support such data type. This lead into confusions and errors.
The "string[]" data type should replaced with "array" data type.
Example:
{{{
wp_check_filetype( string $filename, string[] $mimes = null ): array
}}}
Fixed:
{{{
wp_check_filetype( string $filename, array $mimes = null ): array
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58348>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list