Changeset 5493
- Timestamp:
- 05/16/2017 10:39:37 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/events/1.0/index.php
r5492 r5493 103 103 */ 104 104 function build_response( $location ) { 105 if ( false === $location ) { 106 // No location was determined for the request. Bail with an error. 107 $events = array(); 108 $error = 'no_location_available'; 109 } else { 105 $events = array(); 106 107 if ( $location ) { 110 108 $event_args = array(); 111 109 … … 130 128 $location = rebuild_location_from_event_source( $events ); 131 129 } 130 } 131 132 if ( false === $location ) { 133 $error = 'no_location_available'; 132 134 } 133 135 … … 410 412 * @param array $events 411 413 * 412 * @return array 414 * @return array|false 413 415 */ 414 416 function rebuild_location_from_event_source( $events ) { 415 $location = array();417 $location = false; 416 418 417 419 foreach ( $events as $event ) {
Note: See TracChangeset
for help on using the changeset viewer.