- Timestamp:
- 09/09/2021 01:58:25 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-bulk-upgrader-skin.php
r51781 r51782 90 90 91 91 /** 92 * @param string|WP_Error $error 92 * @since 5.9.0 Renamed `$error` to `$errors` for PHP 8 named parameter support. 93 * 94 * @param string|WP_Error $errors Errors. 93 95 */ 94 public function error( $error ) {95 if ( is_string( $error ) && isset( $this->upgrader->strings[ $error] ) ) {96 $this->error = $this->upgrader->strings[ $error ];96 public function error( $errors ) { 97 if ( is_string( $errors ) && isset( $this->upgrader->strings[ $errors ] ) ) { 98 $this->error = $this->upgrader->strings[ $errors ]; 97 99 } 98 100 99 if ( is_wp_error( $error ) ) {101 if ( is_wp_error( $errors ) ) { 100 102 $messages = array(); 101 foreach ( $error ->get_error_messages() as $emessage ) {102 if ( $error ->get_error_data() && is_string( $error->get_error_data() ) ) {103 $messages[] = $emessage . ' ' . esc_html( strip_tags( $error ->get_error_data() ) );103 foreach ( $errors->get_error_messages() as $emessage ) { 104 if ( $errors->get_error_data() && is_string( $errors->get_error_data() ) ) { 105 $messages[] = $emessage . ' ' . esc_html( strip_tags( $errors->get_error_data() ) ); 104 106 } else { 105 107 $messages[] = $emessage;
Note: See TracChangeset
for help on using the changeset viewer.