Changeset 41174
- Timestamp:
- 07/27/2017 04:59:36 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/theme.php
r41168 r41174 36 36 $theme_directories = search_theme_directories(); 37 37 38 if ( count( $wp_theme_directories ) > 1 ) {38 if ( is_array( $wp_theme_directories ) && count( $wp_theme_directories ) > 1 ) { 39 39 // Make sure the current theme wins out, in case search_theme_directories() picks the wrong 40 40 // one in the case of a conflict. (Normally, last registered theme root wins.) … … 628 628 global $wp_theme_directories; 629 629 630 if ( count($wp_theme_directories) <= 1 )630 if ( ! is_array( $wp_theme_directories ) || count( $wp_theme_directories ) <= 1 ) { 631 631 return '/themes'; 632 } 632 633 633 634 $theme_root = false; -
trunk/tests/phpunit/tests/post/types.php
r40635 r41174 424 424 ) ); 425 425 426 $this->assertSame( 1, count( $wp_filter['future_foo'] ) ); 426 $this->assertArrayHasKey( 'future_foo', $wp_filter ); 427 $this->assertSame( 1, count( $wp_filter['future_foo']->callbacks ) ); 427 428 $this->assertTrue( unregister_post_type( 'foo' ) ); 428 429 $this->assertArrayNotHasKey( 'future_foo', $wp_filter ); … … 440 441 ) ); 441 442 442 $this->assertSame( 1, count( $wp_filter['add_meta_boxes_foo'] ) ); 443 $this->assertArrayHasKey( 'add_meta_boxes_foo', $wp_filter ); 444 $this->assertSame( 1, count( $wp_filter['add_meta_boxes_foo']->callbacks ) ); 443 445 $this->assertTrue( unregister_post_type( 'foo' ) ); 444 446 $this->assertArrayNotHasKey( 'add_meta_boxes_foo', $wp_filter ); -
trunk/tests/phpunit/tests/taxonomy.php
r40921 r41174 765 765 register_taxonomy( 'foo', 'post' ); 766 766 767 $this->assertSame( 1, count( $wp_filter['wp_ajax_add-foo'] ) ); 767 $this->assertArrayHasKey( 'wp_ajax_add-foo', $wp_filter ); 768 $this->assertSame( 1, count( $wp_filter['wp_ajax_add-foo']->callbacks ) ); 768 769 $this->assertTrue( unregister_taxonomy( 'foo' ) ); 769 770 $this->assertArrayNotHasKey( 'wp_ajax_add-foo', $wp_filter );
Note: See TracChangeset
for help on using the changeset viewer.