WordPress.org

Make WordPress Core

Changeset 25775


Ignore:
Timestamp:
10/14/13 20:19:52 (4 years ago)
Author:
nacin
Message:

In the upgrader, only print additional error data if it is a string.

As in [25576], we sometimes want to return additional data that is not necessarily meant for UI consumption.

see #25576.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-upgrader-skins.php

    r25566 r25775  
    6666        } elseif ( is_wp_error($errors) && $errors->get_error_code() ) { 
    6767            foreach ( $errors->get_error_messages() as $message ) { 
    68                 if ( $errors->get_error_data() ) 
     68                if ( $errors->get_error_data() && is_string( $errors->get_error_data() ) ) 
    6969                    $this->feedback($message . ' ' . esc_html( $errors->get_error_data() ) ); 
    7070                else 
     
    206206        if ( is_wp_error($error) ) { 
    207207            foreach ( $error->get_error_messages() as $emessage ) { 
    208                 if ( $error->get_error_data() ) 
     208                if ( $error->get_error_data() && is_string( $error->get_error_data() ) ) 
    209209                    $messages[] = $emessage . ' ' . esc_html( $error->get_error_data() ); 
    210210                else 
Note: See TracChangeset for help on using the changeset viewer.