Commit 1a747b81 authored by Steven Ayers's avatar Steven Ayers Committed by Steven Ayers
Browse files

Issue #1936276 by bluegeek9: IPv6 in database

parent 101f09a3
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -168,6 +168,12 @@ function visitors_update_8213(&$sandbox) {
    ->execute();

  foreach ($logs as $log) {
    $sandbox['progress'] += 1;
    $sandbox['last_id'] = $log->visitors_id;

    if (FALSE == intval($log->visitors_ip)) {
      continue;
    }
    $ip_address = long2ip($log->visitors_ip);
    if ($ip_address === FALSE) {
      continue;
@@ -183,8 +189,7 @@ function visitors_update_8213(&$sandbox) {
    catch (\Exception $e) {
      watchdog_exception('visitors', $e);
    }
    $sandbox['progress'] += 1;
    $sandbox['last_id'] = $log->visitors_id;

  }
  $sandbox['#finished'] = empty($sandbox['max']) ? 1 : $sandbox['progress'] / $sandbox['max'];
}