Forráskód Böngészése

Public Themes B: PHP Rector fixes (#7383)

Matthew Reishus 1 éve
szülő
commit
34f3717ef8
1 módosított fájl, 1 hozzáadás és 1 törlés
  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.
 		// 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 );
 		set_transient( 'button_2_categories', $all_the_cool_cats );
 	}
 	}