Make WordPress Core

Changeset 19733


Ignore:
Timestamp:
01/13/2012 06:15:55 PM (13 years ago)
Author:
duck_
Message:

Prevent "Undefined index: settings-updated" notice in settings_errors(). Props garyc40. Fixes #19377.

File:
1 edited

Legend:

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

    r19687 r19733  
    12531253function settings_errors( $setting = '', $sanitize = false, $hide_on_update = false ) {
    12541254
    1255     if ($hide_on_update AND $_GET['settings-updated']) return;
     1255    if ( $hide_on_update && ! empty( $_GET['settings-updated'] ) )
     1256        return;
    12561257
    12571258    $settings_errors = get_settings_errors( $setting, $sanitize );
    12581259
    1259     if ( !is_array($settings_errors) ) return;
     1260    if ( ! is_array( $settings_errors ) )
     1261        return;
    12601262
    12611263    $output = '';
Note: See TracChangeset for help on using the changeset viewer.