diff --git a/modules/widgets/contact-info.php b/modules/widgets/contact-info.php index dbcf05e1350..dfd8e364e7d 100644 --- a/modules/widgets/contact-info.php +++ b/modules/widgets/contact-info.php @@ -209,13 +209,12 @@ function update( $new_instance, $old_instance ) { $json_obj = json_decode( $json ); - if ( 'ZERO_RESULTS' == $json_obj->status ) { + if ( 'ZERO_RESULTS' == $json_obj->status || empty( $json_obj->results ) ) { // The address supplied does not have a matching lat / lon. // No map is available. $instance['lat'] = '0'; $instance['lon'] = '0'; } else { - $loc = $json_obj->results[0]->geometry->location; $lat = floatval( $loc->lat );