[wp-trac] [WordPress Trac] #56962: current_user_can( 'read_post' ) not working.

WordPress Trac noreply at wordpress.org
Thu Nov 24 14:16:55 UTC 2022


#56962: current_user_can( 'read_post' )  not working.
-----------------------------+----------------------
 Reporter:  jcorbin          |       Owner:  (none)
     Type:  defect (bug)     |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Role/Capability  |     Version:  6.1
 Severity:  major            |  Resolution:  wontfix
 Keywords:  close            |     Focuses:
-----------------------------+----------------------

Comment (by pikamander2):

 Replying to [comment:10 SergeyBiryukov]:
 > I might be missing something, but [53408] / #44591 does include a
 `_doing_it_wrong()` message that should be added to the error log if
 `WP_DEBUG` is enabled:
 > > `Notice: Function map_meta_cap was called incorrectly. When checking
 for the edit_post capability, you must always check it against a specific
 post. Please see Debugging in WordPress for more information. (This
 message was added in version 6.1.0.)`

 Most sites have WP_DEBUG disabled by default, including ours.

 It's good to know that there was a debug message there, though out of
 curiosity, why is that message hidden behind WP_DEBUG? I know that I've
 previously seen WordPress point out argument/syntax issues without having
 WP_DEBUG enabled.

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


More information about the wp-trac mailing list