Making WordPress.org


Ignore:
Timestamp:
09/28/2018 05:31:08 PM (6 years ago)
Author:
iandunn
Message:

WordCamp Post Type: Treat geocoding item as object to avoid error.

r7702 introduced a bug where the result item was referenced as if it were an array instead of an object, causing a fatal error when saving the post.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php

    r7702 r7709  
    175175
    176176            // Don't delete the existing (and probably good) values if the request failed
    177             if ( is_wp_error( $response ) || empty( $body->results[0]['address_components'] ) ) {
     177            if ( is_wp_error( $response ) || empty( $body->results[0]->address_components ) ) {
    178178                Logger\log( 'geocoding_failure', compact( 'request_url', 'response' ) );
    179179                return;
Note: See TracChangeset for help on using the changeset viewer.