[wp-trac] [WordPress Trac] #21640: Incorrect datatype for $post_type param in PHPDocs for count_many_users_posts
WordPress Trac
wp-trac at lists.automattic.com
Mon Aug 20 15:53:58 UTC 2012
#21640: Incorrect datatype for $post_type param in PHPDocs for
count_many_users_posts
-------------------------+-----------------------------
Reporter: willmot | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Inline Docs | Version: 3.2
Severity: normal | Keywords: has-patch
-------------------------+-----------------------------
`count_many_users_posts` has supported passing the post_type as a second
param since #17220 [17742] however the `@param` PHPDocs for the
`$post_type` parameter incorrectly list the datatype as `string|array`
when in-fact it should be `string`.
Passing an array causes a PHP error because the `$post_type` param is
passed to `get_posts_by_author_sql` which assumes it is a string.
{{{
Warning: Illegal offset type in isset or empty in /wp-includes/post.php on
line 840
}}}
Attached patch sets the PHPDocs `@param` datatype for the post_type param
to string.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21640>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list