WordPress.org

Make WordPress Core

Ticket #20364: 20364.diff

File 20364.diff, 524 bytes (added by westi, 6 years ago)

Simple fix to check for false as well as errors

  • dashboard.php

     
    364364
    365365        echo "\n\t<p>";
    366366
    367         if ( $theme->errors() ) {
     367        if ( !$theme || $theme->errors() ) {
    368368                if ( ! is_multisite() || is_super_admin() )
    369369                        echo '<span class="error-message">' . __('ERROR: The themes directory is either empty or doesn&#8217;t exist. Please check your installation.') . '</span>';
    370370        } elseif ( ! empty($wp_registered_sidebars) ) {