Changeset 39325 for trunk/src/wp-admin/includes/plugin-install.php
- Timestamp:
- 11/21/2016 01:51:39 AM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/plugin-install.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/plugin-install.php
r38953 r39325 156 156 157 157 if ( $ssl && is_wp_error( $request ) ) { 158 trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE ); 158 trigger_error( 159 sprintf( 160 /* translators: %s: support forums URL */ 161 __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ), 162 __( 'https://wordpress.org/support/' ) 163 ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), 164 headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE 165 ); 159 166 $request = wp_remote_post( $http_url, $http_args ); 160 167 } 161 168 162 169 if ( is_wp_error($request) ) { 163 $res = new WP_Error('plugins_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ), $request->get_error_message() ); 170 $res = new WP_Error( 'plugins_api_failed', 171 sprintf( 172 /* translators: %s: support forums URL */ 173 __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ), 174 __( 'https://wordpress.org/support/' ) 175 ), 176 $request->get_error_message() 177 ); 164 178 } else { 165 179 $res = maybe_unserialize( wp_remote_retrieve_body( $request ) ); 166 if ( ! is_object( $res ) && ! is_array( $res ) ) 167 $res = new WP_Error('plugins_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ), wp_remote_retrieve_body( $request ) ); 180 if ( ! is_object( $res ) && ! is_array( $res ) ) { 181 $res = new WP_Error( 'plugins_api_failed', 182 sprintf( 183 /* translators: %s: support forums URL */ 184 __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ), 185 __( 'https://wordpress.org/support/' ) 186 ), 187 wp_remote_retrieve_body( $request ) 188 ); 189 } 168 190 } 169 191 } elseif ( !is_wp_error($res) ) {
Note: See TracChangeset
for help on using the changeset viewer.