Changeset 7702
- Timestamp:
- 09/24/2018 11:24:59 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php
r7701 r7702 1 1 <?php 2 2 3 use WordCamp\Logger; 3 4 use WordCamp\Mentors_Dashboard; 4 5 use WordPress_Community\Applications\WordCamp_Application; … … 171 172 172 173 $response = wcorg_redundant_remote_get( $request_url ); 174 $body = json_decode( wp_remote_retrieve_body( $response ) ); 173 175 174 176 // Don't delete the existing (and probably good) values if the request failed 175 if ( is_wp_error( $response ) ) { 177 if ( is_wp_error( $response ) || empty( $body->results[0]['address_components'] ) ) { 178 Logger\log( 'geocoding_failure', compact( 'request_url', 'response' ) ); 176 179 return; 177 180 }
Note: See TracChangeset
for help on using the changeset viewer.