Ticket #44168: 44168.diff
File 44168.diff, 1.5 KB (added by , 7 years ago) |
---|
-
src/wp-admin/includes/ajax-actions.php
951 951 952 952 $level = 0; 953 953 if ( is_taxonomy_hierarchical( $taxonomy ) ) { 954 $level = count( get_ancestors( $tag->term_id, $taxonomy, 'taxonomy' ) ); 954 $ancestors = get_ancestors( $tag->term_id, $taxonomy, 'taxonomy' ); 955 $level = is_countable( $ancestors ) ? count( $ancestors ) : 0; 955 956 ob_start(); 956 957 $wp_list_table->single_row( $tag, $level ); 957 958 $noparents = ob_get_clean(); … … 4248 4249 4249 4250 ob_start(); 4250 4251 $wp_list_table->display(); 4251 $status['count'] = count( $wp_list_table->items );4252 $status['count'] = is_countable( $wp_list_table->items ) ? count( $wp_list_table->items ) : 0; 4252 4253 $status['items'] = ob_get_clean(); 4253 4254 4254 4255 wp_send_json_success( $status ); … … 4400 4401 } 4401 4402 4402 4403 // Do we have any registered exporters? 4403 if ( 0 < count( $exporters ) ) {4404 if ( is_countable( $exporters ) && 0 < count( $exporters ) ) { 4404 4405 if ( $exporter_index < 1 ) { 4405 4406 wp_send_json_error( __( 'Exporter index cannot be negative.' ) ); 4406 4407 } … … 4580 4581 $erasers = apply_filters( 'wp_privacy_personal_data_erasers', array() ); 4581 4582 4582 4583 // Do we have any registered erasers? 4583 if ( 0 < count( $erasers ) ) {4584 if ( is_countable( $erasers ) && 0 < count( $erasers ) ) { 4584 4585 4585 4586 if ( $eraser_index < 1 ) { 4586 4587 wp_send_json_error( __( 'Eraser index cannot be less than one.' ) );