Make WordPress Core

Ticket #42498: 42498.2.patch

File 42498.2.patch, 519 bytes (added by pross, 6 years ago)

Use empty()

  • wp-admin/includes/template.php

    diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
    index ec0fb52591..b45638b803 100644
    a b function get_settings_errors( $setting = '', $sanitize = false ) { 
    14571457        }
    14581458
    14591459        // Check global in case errors have been added on this pageload.
    1460         if ( ! count( $wp_settings_errors ) )
     1460        if ( empty( $wp_settings_errors ) )
    14611461                return array();
    14621462
    14631463        // Filter the results to those of a specific setting if one was set.