Changeset 31449
- Timestamp:
- 02/13/2015 04:26:37 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r31418 r31449 346 346 $args = wp_parse_args( $args, $defaults ); 347 347 348 if ( strlen( $taxonomy ) > 32 ) {349 _doing_it_wrong( __FUNCTION__, __( 'Taxonom ies cannot exceed 32 characters in length' ), '4.0' );350 return new WP_Error( 'taxonomy_ too_long', __( 'Taxonomies cannot exceed 32 characters in length' ) );348 if ( empty( $taxonomy ) || strlen( $taxonomy ) > 32 ) { 349 _doing_it_wrong( __FUNCTION__, __( 'Taxonomy names must be between 1 and 32 characters in length.' ), '4.2' ); 350 return new WP_Error( 'taxonomy_length_invalid', __( 'Taxonomy names must be between 1 and 32 characters in length.' ) ); 351 351 } 352 352 -
trunk/tests/phpunit/tests/taxonomy.php
r31307 r31449 155 155 156 156 /** 157 * @ticket 31135 158 * 159 * @expectedIncorrectUsage register_taxonomy 160 */ 161 function test_register_short_taxonomy() { 162 $this->assertInstanceOf( 'WP_Error', register_taxonomy( '', 'post', array() ) ); 163 } 164 165 /** 157 166 * @ticket 21593 158 167 *
Note: See TracChangeset
for help on using the changeset viewer.