Explorar o código

Public Themes B: PHP Rector fixes (#7383)

Matthew Reishus hai 1 ano
pai
achega
34f3717ef8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      button-2/inc/template-tags.php

+ 1 - 1
button-2/inc/template-tags.php

@@ -100,7 +100,7 @@ function button_2_categorized_blog() {
 		) );
 
 		// Count the number of categories that are attached to the posts.
-		$all_the_cool_cats = count( $all_the_cool_cats );
+		$all_the_cool_cats = is_countable( $all_the_cool_cats ) ? count( $all_the_cool_cats ) : 0;
 
 		set_transient( 'button_2_categories', $all_the_cool_cats );
 	}