@@ -238,6 +238,7 @@ add_action( 'enqueue_block_editor_assets', 'scratchpad_editor_styles' );
* Used on image format posts as fallback.
*/
function scratchpad_get_image( $post_id = null, $thumbnail_size = '' ) {
+ $image = null;
if ( ! $post_id ) {
$post_id = get_the_ID();
}
@@ -160,7 +160,7 @@ function scratchpad_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( 'scratchpad_categories', $all_the_cool_cats );
@@ -89,7 +89,7 @@ function shoreditch_categorized_blog() {
set_transient( 'shoreditch_categories', $all_the_cool_cats );