Make WordPress Core


Ignore:
Timestamp:
11/10/2017 10:29:45 PM (7 years ago)
Author:
westonruter
Message:

Settings: Replace count() call with empty() in get_settings_errors() to prevent PHP 7.2 warnings when $wp_settings_errors is null.

Props pross, dd32, westonruter.
See #40109.
Fixes #42498 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/template.php

    r41906 r42146  
    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();
     1462    }
    14621463
    14631464    // Filter the results to those of a specific setting if one was set.
Note: See TracChangeset for help on using the changeset viewer.