A client sent me this screenshot.
They are heavy Microsoft users, so they are probably using Edge (waiting for confirmation).

Line 150 of ip_lookup.module encounters a warning because $ub is not defined for many browsers.

There are multiple options here:

  • Add a catch-all value for $ub (easiest but inaccurate)
  • Download user agent database file and include with module (depending on licensing issues)
  • Add code to talk to a user agent database (harder but very accurate)

Simplest option can look like this, starting at line 147:

  else {
    $bname = 'Unknown';
    $ub = "Unknown";
  }
CommentFileSizeAuthor
undefined_variable.png114.21 KBarnaldop

Comments

arnaldop created an issue. See original summary.

  • Jiang_2015 committed 3efd123 on 8.x-1.x
    Issue #3088452 by arnaldop: Undefined Variable $ub when using unknown...
jiang_2015’s picture

I went to the easiest option and add the Edge to the variable. I will do the third option in the future. Thank you so much for your help.

jiang_2015’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.