[wp-trac] [WordPress Trac] #31760: Undefined index: post_status when previewing post.

WordPress Trac noreply at wordpress.org
Thu Mar 26 01:41:34 UTC 2015


#31760: Undefined index: post_status when previewing post.
-------------------------------+--------------------
 Reporter:  szaqal21           |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  4.2
Component:  Posts, Post Types  |     Version:  4.1.1
 Severity:  normal             |  Resolution:
 Keywords:  has-patch          |     Focuses:
-------------------------------+--------------------
Changes (by boonebgorges):

 * milestone:  Awaiting Review => 4.2


Comment:

 Replying to [comment:1 tyxla]:
 > Since the user has no publishing capabilities, the post status box
 should definitely not be there. So that is working correctly IMO. However,
 the `post_status` had to be checked before used, which is addressed in the
 patch above.

 Yes, this is correct. Note that it takes a pretty odd set of circumstances
 to get to this point: you have to be previewing a post that you did not
 write, and therefore you must have 'edit_others_posts' (perhaps among
 other caps), but you can't have 'publish_posts'.

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


More information about the wp-trac mailing list