Changeset 5537
- Timestamp:
- 06/05/2017 10:51:59 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/events/1.0/index.php
r5501 r5537 142 142 * 143 143 * @todo Update the user-agent strings if 40702-geoip.2.diff doesn't make it into beta2 144 * @todo Remove this back-compat code after beta2 has been out for a few days 144 * @todo Remove this back-compat code after 4.8.0 has been out for a few days, to avoid 145 * impacting the feature plugin in 4.7 installs. rebuild_location_from_event_source() 146 * can probably be removed at that time too. 145 147 */ 146 148 $use_fuzzy_locations = false !== strpos( $_SERVER['HTTP_USER_AGENT'], '4.7' ) || false !== strpos( $_SERVER['HTTP_USER_AGENT'], '4.8-beta1' ); … … 387 389 * @param string $dotted_ip 388 390 * 389 * @return null|object `null` on failure; an object on success391 * @return false|object `false` on failure; an object on success 390 392 */ 391 393 function guess_location_from_ip( $dotted_ip ) { … … 405 407 406 408 if ( false === $long_ip || ! isset( $from, $where ) ) { 407 return ;409 return false; 408 410 } 409 411 … … 419 421 // Unknown location: 420 422 if ( ! $row || '-' == $row->country_short ) { 421 return ;423 return false; 422 424 } 423 425
Note: See TracChangeset
for help on using the changeset viewer.