mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Return a WP_Error if an empty name is provided when registering a taxonomy.
Fixes #31135 Props tyxla, MikeHansenMe git-svn-id: https://develop.svn.wordpress.org/trunk@31449 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -153,6 +153,15 @@ class Tests_Taxonomy extends WP_UnitTestCase {
|
||||
unset($GLOBALS['wp_taxonomies'][$tax]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 31135
|
||||
*
|
||||
* @expectedIncorrectUsage register_taxonomy
|
||||
*/
|
||||
function test_register_short_taxonomy() {
|
||||
$this->assertInstanceOf( 'WP_Error', register_taxonomy( '', 'post', array() ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 21593
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user