[wp-trac] [WordPress Trac] #40891: map_meta_cap() causing PHP notice on term meta permissions
WordPress Trac
noreply at wordpress.org
Mon Jul 3 15:59:54 UTC 2017
#40891: map_meta_cap() causing PHP notice on term meta permissions
-------------------------------------+------------------
Reporter: caercam | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.9
Component: Role/Capability | Version: 4.7
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+------------------
Changes (by boonebgorges):
* keywords: has-patch needs-refresh needs-unit-tests => has-patch needs-
testing
Comment:
Thank you, @caercam! The test is a good start, but (a) as written, it
fails after the patch is applied (because the expected notice is no longer
thrown), and (b) it doesn't actually test anything. I've written a more
targeted test that checks for the actual return value of `user_can()` when
passing a bad term ID, which fails with an error before the patch. Can you
double check to see that the logic is correct? [attachment:40891.3.diff]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40891#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list