[wp-trac] [WordPress Trac] #45596: Argument type mismatch
WordPress Trac
noreply at wordpress.org
Wed Dec 12 14:16:41 UTC 2018
#45596: Argument type mismatch
------------------------------+------------------------------
Reporter: subrataemfluence | Owner: (none)
Type: defect (bug) | Status: new
Priority: low | Milestone: Awaiting Review
Component: General | Version: 5.0
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
------------------------------+------------------------------
Changes (by swissspidy):
* priority: normal => low
* focuses: coding-standards =>
Comment:
We don't usually add things like `string|bool` in these cases, because it
indicates that one could pass `true` as well.
Instead, the default value of `false` means "use current user by default".
So, if anything, I'd change the description to `Optional. User ID.
Defaults to the current author.` or perhaps change the type to
`string|false` to be explicit, or both.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45596#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list