Ticket #44162: 44162.diff
File 44162.diff, 1.3 KB (added by , 7 years ago) |
---|
-
src/wp-admin/edit-form-advanced.php
28 28 ) 29 29 ); 30 30 31 if ( count( $check_users ) > 1 ) {31 if ( is_countable( $check_users ) && count( $check_users ) > 1 ) { 32 32 add_action( 'admin_footer', '_admin_notice_post_locked' ); 33 33 } 34 34 … … 249 249 $revisions = wp_get_post_revisions( $post_ID ); 250 250 251 251 // We should aim to show the revisions meta box only when there are revisions. 252 if ( count( $revisions ) > 1 ) {252 if ( is_countable( $revisions ) && count( $revisions ) > 1 ) { 253 253 reset( $revisions ); // Reset pointer for key() 254 254 $publish_callback_args = array( 255 255 'revisions_count' => count( $revisions ), … … 294 294 add_meta_box( $tax_meta_box_id, $label, $taxonomy->meta_box_cb, null, 'side', 'core', array( 'taxonomy' => $tax_name ) ); 295 295 } 296 296 297 if ( post_type_supports( $post_type, 'page-attributes' ) || count( get_page_templates( $post ) ) > 0) {297 if ( post_type_supports( $post_type, 'page-attributes' ) || ( is_countable( get_page_templates( $post ) ) && count( get_page_templates( $post ) ) > 0 ) ) { 298 298 add_meta_box( 'pageparentdiv', $post_type_object->labels->attributes, 'page_attributes_meta_box', null, 'side', 'core' ); 299 299 } 300 300