Make WordPress Core

Ticket #44124: 44124.diff

File 44124.diff, 635 bytes (added by ianbelanger, 7 years ago)

Updated custom-header.php with new is_countable() function

  • src/wp-admin/custom-header.php

     
    283283                        $type    = 'uploaded';
    284284                }
    285285
    286                 if ( 1 < count( $headers ) ) {
     286                if ( is_countable( $headers ) && count( $headers ) > 1 ) {
    287287                        echo '<div class="random-header">';
    288288                        echo '<label><input name="default-header" type="radio" value="random-' . $type . '-image"' . checked( is_random_header_image( $type ), true, false ) . ' />';
    289289                        _e( '<strong>Random:</strong> Show a different image on each page.' );