Changeset 40295
- Timestamp:
- 03/17/2017 02:35:08 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-functions.php
r39920 r40295 576 576 if ( in_array( $blogname, $illegal_names ) ) 577 577 $errors->add('blogname', __( 'That name is not allowed.' ) ); 578 579 if ( strlen( $blogname ) < 4 && !is_super_admin() )580 $errors->add('blogname', __( 'Site name must be at least 4 characters.' ) );581 578 582 579 // do not allow users to create a blog that conflicts with a page on the main blog. -
trunk/tests/phpunit/tests/multisite/wpmuValidateBlogSignup.php
r40294 r40295 67 67 ); 68 68 69 if ( ! is_super_admin() ) {70 $data[] = array( 'foo', 'Site names must at least contain 4 characters.' );71 }72 73 69 $illegal_names = get_site_option( 'illegal_names' ); 74 70 if ( ! empty( $illegal_names ) ) { … … 90 86 $this->assertEmpty( $result['errors']->get_error_codes() ); 91 87 } 88 89 /** 90 * @ticket 39676 91 */ 92 public function test_validate_short_blogname() { 93 $result = wpmu_validate_blog_signup( 'foo', 'Foo Site Title', get_userdata( self::$super_admin_id ) ); 94 $this->assertEmpty( $result['errors']->get_error_codes() ); 95 } 92 96 } 93 97
Note: See TracChangeset
for help on using the changeset viewer.