Make WordPress Core


Ignore:
Timestamp:
11/10/2017 10:31:58 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 4.9.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-admin/includes/template.php

    r41906 r42147  
    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.