Skip to content

Commit eebe7b4

Browse files
committed
Fixed PHP warning
1 parent d9688c4 commit eebe7b4

5 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/www/debug/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
$action = $page->actions();
1212

13-
$ua = stringOr(getVar("ua"), $_SERVER["HTTP_USER_AGENT"]);
13+
$ua = stringOr(getVar("ua"), isset($_SERVER["HTTP_USER_AGENT"]) ? $_SERVER["HTTP_USER_AGENT"] : "Not accessible");
1414

1515

1616
$Identify = new Identify();

src/www/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
$action = $page->actions();
1212

13-
$ua = stringOr(getVar("ua"), $_SERVER["HTTP_USER_AGENT"]);
13+
$ua = stringOr(getVar("ua"), isset($_SERVER["HTTP_USER_AGENT"]) ? $_SERVER["HTTP_USER_AGENT"] : "Not accessible");
1414

1515
$Identify = new Identify();
1616
$device = $Identify->identifyDevice($ua);

src/www/js-include/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
$action = $page->actions();
1111

12-
$ua = stringOr(getVar("ua"), $_SERVER["HTTP_USER_AGENT"]);
12+
$ua = stringOr(getVar("ua"), isset($_SERVER["HTTP_USER_AGENT"]) ? $_SERVER["HTTP_USER_AGENT"] : "Not accessible");
1313

1414

1515
// include _include in path - for development

src/www/jsonp/index.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
include_once("classes/identify.class.php");
99

1010
$action = $page->actions();
11+
$ua = isset($_SERVER["HTTP_USER_AGENT"]) ? $_SERVER["HTTP_USER_AGENT"] : "";
1112

12-
$ua = stringOr(getVar("ua"), $_SERVER["HTTP_USER_AGENT"]);
13+
$ua = stringOr(getVar("ua"), isset($_SERVER["HTTP_USER_AGENT"]) ? $_SERVER["HTTP_USER_AGENT"] : "Not accessible");
1314
$callback = stringOr(getVar("callback"), "callback");
1415

1516
$Identify = new Identify();

src/www/xml/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
$action = $page->actions();
1212

13-
$ua = stringOr(getVar("ua"), $_SERVER["HTTP_USER_AGENT"]);
13+
$ua = stringOr(getVar("ua"), isset($_SERVER["HTTP_USER_AGENT"]) ? $_SERVER["HTTP_USER_AGENT"] : "Not accessible");
1414

1515
$Identify = new Identify();
1616
$device = $Identify->identifyDevice($ua);

0 commit comments

Comments
 (0)