Commit afe2645e authored by Sven Berg Ryen's avatar Sven Berg Ryen Committed by Sven Berg Ryen
Browse files

Issue #3314375 by svenryen: 7.x Smart IP fails to get the country code

parent 4d5d6d9c
Loading
Loading
Loading
Loading
+2 −2
Changes for eu_cookie_compliance.module: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -740,8 +740,8 @@ function eu_cookie_compliance_user_in_eu() {
    $country_code = geoip_country_code();
  }
  elseif (module_exists('smart_ip')) {
    $smart_ip_session = smart_ip_session_get('smart_ip');
    $country_code = isset($smart_ip_session['location']['country_code']) ? $smart_ip_session['location']['country_code'] : NULL;
    $smart_ip_session = smart_ip_get_location(ip_address());
    $country_code = isset($smart_ip_session['country_code']) ? $smart_ip_session['country_code'] : NULL;
  }

  // If the CloudFlare provided country header is available, use it as a