Ticket #7875: 7875.8.diff
File 7875.8.diff, 1.2 KB (added by , 16 years ago) |
---|
-
wp-admin/includes/class-wp-upgrader.php
722 722 if ( is_string($errors) ) { 723 723 $this->feedback($errors); 724 724 } elseif ( is_wp_error($errors) && $errors->get_error_code() ) { 725 foreach ( $errors->get_error_messages() as $message ) 726 $this->feedback($message); 725 foreach ( $errors->get_error_messages() as $message ) { 726 if ( $errors->get_error_data() ) 727 $this->feedback($message . ' ' . $errors->get_error_data() ); 728 else 729 $this->feedback($message); 730 } 727 731 } 728 732 } 729 733 … … 731 735 if ( isset( $this->upgrader->strings[$string]) ) 732 736 $string = $this->upgrader->strings[$string]; 733 737 734 $args = func_get_args(); 735 $args = array_splice($args, 1); 736 if ( !empty($args) ) 737 $string = vsprintf($string, $args); 738 if ( strpos($string, '%') !== false ) { 739 $args = func_get_args(); 740 $args = array_splice($args, 1); 741 if ( !empty($args) ) 742 $string = vsprintf($string, $args); 743 } 738 744 if ( empty($string) ) 739 745 return; 740 746 show_message($string);