[wp-trac] [WordPress Trac] #26466: class-wp-posts-list-table.php : prepare_items() - Is $post_type global?
WordPress Trac
noreply at wordpress.org
Fri Feb 21 18:33:28 UTC 2014
#26466: class-wp-posts-list-table.php : prepare_items() - Is $post_type global?
-------------------------------+------------------------------
Reporter: tivnet | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 3.5
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses: administration
-------------------------------+------------------------------
Changes (by jessepollak):
* keywords: => reporter-feedback
Comment:
Thanks for this bug report, sorry it took a little while to respond!
I have not been able to replicate this issue, are you still seeing it in
3.8 and/or trunk?
From my exploration, I've tracked $post_type through a few layers:
* $post_type is set to $typenow
[here](https://core.trac.wordpress.org/browser/tags/3.8.1/src/wp-
admin/edit.php#L15)
* $typenow is set to $_REQUEST['post_type']
[here](https://core.trac.wordpress.org/browser/tags/3.8.1/src/wp-
admin/admin.php#L106)
* $typenow is validated that is is a valid post type before being set
[here](https://core.trac.wordpress.org/browser/tags/3.8.1/src/wp-
admin/admin.php#L105)
* $typenow is overriden to be the screen post_type
[here](https://core.trac.wordpress.org/browser/tags/3.8.1/src/wp-
admin/includes/screen.php#L504) before $post_type is set to it
Ultimately, $post_type pretty much is ends up being set to the
screen->post_type. In my grepping, I don't see any instance where this
would be set to an array (it's always explicitly set to string), but if it
were to be set to an array, it could cause problems here.
I'd guess that this is an issue with a plugin messing with the screen post
type.
If this bug still exists, could you give us the output of the error? Also,
your a generalized version of your tags and posts would be valuable.
Thanks again for the report!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26466#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list