[wp-trac] [WordPress Trac] #23668: Check for empty slug input in register_taxonomy
WordPress Trac
noreply at wordpress.org
Sat Mar 2 18:20:57 UTC 2013
#23668: Check for empty slug input in register_taxonomy
------------------------------------+--------------------------
Reporter: cliffseal | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Taxonomy
Version: 3.5.1 | Severity: normal
Keywords: has-patch dev-feedback |
------------------------------------+--------------------------
If you give an empty string for the `slug` part of the `rewrite` array in
a `register_taxonomy` call, like:
{{{
'rewrite' => array(
'slug' => ''
)
}}}
...you get some wacky permalink issues, even when you flush properly. In
my case, I was seeing top-level pages (only) 404 while everything else
worked. Removing this admittedly poor part of the code fixed it, but this
should be checked for. The `register_post_type` function ensures this
isn't empty, and this function should as well.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23668>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list