diff --git a/README.md b/README.md
index 8aa4c5e535b1a2dab76c1736980f63b082057722..a42a4ea7b98212c161d027a93e0d97225bc27c42 100755
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ to be able to display javascript quickly and correctly.
 phpIPAM has been developed and tested on the following PHP versions.\
 The use of untested PHP versions is unsupported and may result in compatibility issues.
 
-- MASTER: PHP versions 5.4 to 8.2 (8.x support work-in-progress)
+- MASTER: PHP versions 5.4 to 8.1 (8.x support work-in-progress)
 - 1.5.x: PHP versions 5.4 to 7.4
 - 1.4.x: PHP versions 5.4 to 7.4
 - 1.3.x: PHP versions 5.4 to 7.1
diff --git a/app/admin/requests/index.php b/app/admin/requests/index.php
index 0e6ace7c3a9e0725a1d34b45f34ab3af1cd75bf0..3a6d42516017638322b07c11574ab99ecebc128c 100755
--- a/app/admin/requests/index.php
+++ b/app/admin/requests/index.php
@@ -12,7 +12,7 @@ $active_requests   = $Tools->fetch_multiple_objects ("requests", "processed", 0,
 $inactive_requests = $Tools->fetch_multiple_objects ("requests", "processed", 1, "id", false);
 # set hidden custom fields
 $hidden_cfields = pf_json_decode($User->settings->hiddenCustomFields, true);
-$hidden_cfields = is_array($hidden_cfields['requests']) ? $hidden_cfields['requests'] : array();
+$hidden_cfields = isset($hidden_cfields['requests']) ? $hidden_cfields['requests'] : array();
 ?>
 
 <h4><?php print _('List of all active IP addresses requests'); ?></h4>
diff --git a/app/dashboard/widgets/access_logs.php b/app/dashboard/widgets/access_logs.php
index bc5399c0a327408d7cda07b2bddfce97344ec021..f9e2a3fef555ee3360fc2e961a0783ca6492e880 100755
--- a/app/dashboard/widgets/access_logs.php
+++ b/app/dashboard/widgets/access_logs.php
@@ -1,7 +1,7 @@
 <?php
 
 # required functions
-if(!is_object(@$User)) {
+if(!isset($User)) {
 	require_once( dirname(__FILE__) . '/../../../functions/functions.php' );
 	# classes
 	$Database	= new Database_PDO;
@@ -16,7 +16,7 @@ if(!is_object(@$User)) {
 $User->check_user_session ();
 
 # if direct request that redirect to tools page
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
+if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest")	{
 	header("Location: ".create_link("tools","logs"));
 }
 
diff --git a/app/dashboard/widgets/bw_calculator.php b/app/dashboard/widgets/bw_calculator.php
index 1264409236f85311d0288a95a1cd2c56207e5f03..61974ee97ee097882f36e7b081d813d1735f1631 100644
--- a/app/dashboard/widgets/bw_calculator.php
+++ b/app/dashboard/widgets/bw_calculator.php
@@ -6,7 +6,7 @@
  *********************************************/
 
 # required functions if requested via AJAX
-if(!is_object(@$User)) {
+if(!isset($User)) {
 	require_once( dirname(__FILE__) . '/../../../functions/functions.php' );
 	# classes
 	$Database	= new Database_PDO;
diff --git a/app/dashboard/widgets/changelog.php b/app/dashboard/widgets/changelog.php
index e315b4ee5257e415973f49c80389b173b39836fc..f556a8746f0548e3216fe094c00299ade2a69992 100755
--- a/app/dashboard/widgets/changelog.php
+++ b/app/dashboard/widgets/changelog.php
@@ -5,7 +5,7 @@
  *********************************************/
 
 # required functions if requested via AJAX
-if(!is_object(@$User)) {
+if(!isset($User)) {
 	require_once( dirname(__FILE__) . '/../../../functions/functions.php' );
 	# classes
 	$Database	= new Database_PDO;
@@ -21,7 +21,7 @@ if(!is_object(@$User)) {
 $User->check_user_session ();
 
 # if direct request that redirect to tools page
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
+if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest")	{
 	header("Location: ".create_link("tools","changelog"));
 }
 
diff --git a/app/dashboard/widgets/customers.php b/app/dashboard/widgets/customers.php
index 212f20d68f2ddb2308e3007bd524d7fad94840d7..d01d7dce8f1c1bebb4d1f6c6e542b7f2e9f67a73 100644
--- a/app/dashboard/widgets/customers.php
+++ b/app/dashboard/widgets/customers.php
@@ -5,7 +5,7 @@
  *********************************************/
 
 # required functions if requested via AJAX
-if(!is_object(@$User)) {
+if(!isset($User)) {
 	require_once( dirname(__FILE__) . '/../../../functions/functions.php' );
 	# classes
 	$Database	= new Database_PDO;
@@ -18,7 +18,7 @@ if(!is_object(@$User)) {
 $User->check_user_session ();
 
 # if direct request that redirect to tools page
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
+if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest")	{
 	header("Location: ".create_link("tools","customers"));
 }
 
diff --git a/app/dashboard/widgets/error_logs.php b/app/dashboard/widgets/error_logs.php
index deb11448e6f20675655a200adf6a58a44bfc44a4..25947277fa36c8bffedfb6644df6b565495726f9 100755
--- a/app/dashboard/widgets/error_logs.php
+++ b/app/dashboard/widgets/error_logs.php
@@ -1,7 +1,7 @@
 <?php
 
 # required functions
-if(!is_object(@$User)) {
+if(!isset($User)) {
 	require_once( dirname(__FILE__) . '/../../../functions/functions.php' );
 	# classes
 	$Database	= new Database_PDO;
@@ -16,7 +16,7 @@ if(!is_object(@$User)) {
 $User->check_user_session ();
 
 # if direct request that redirect to tools page
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
+if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest")	{
 	header("Location: ".create_link("tools","logs"));
 }
 
diff --git a/app/dashboard/widgets/favourite_subnets.php b/app/dashboard/widgets/favourite_subnets.php
index 6c96aacaf0f353df88ce39637be26489f38c3f45..62a12cb38ea3e538b33c3a6e1e63a9aa9fb9d081 100755
--- a/app/dashboard/widgets/favourite_subnets.php
+++ b/app/dashboard/widgets/favourite_subnets.php
@@ -14,7 +14,7 @@ if(!isset($User)) {
 $User->check_user_session ();
 
 # if direct request that redirect to tools page
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
+if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest")	{
 	header("Location: ".create_link("tools","favourites"));
 }
 ?>
diff --git a/app/dashboard/widgets/inactive-hosts.php b/app/dashboard/widgets/inactive-hosts.php
index f1a543eb843b856de1aeec960f4e88c2546c0cc2..d4e9bce629135142b0d2aa038aefb0bc23a8fca1 100644
--- a/app/dashboard/widgets/inactive-hosts.php
+++ b/app/dashboard/widgets/inactive-hosts.php
@@ -4,7 +4,7 @@
  **********************************************/
 
 # required functions
-if(!is_object(@$User)) {
+if(!isset($User)) {
 	require_once( dirname(__FILE__) . '/../../../functions/functions.php' );
 	# classes
 	$Database	= new Database_PDO;
@@ -35,7 +35,7 @@ $m = 0;
 $widget = $Tools->fetch_object ("widgets", "wfile", "inactive-hosts");
 
 # if direct request include plot JS
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
+if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest")	{
 	# get widget details
 	if(!$widget = $Tools->fetch_object ("widgets", "wfile", $_GET['section'])) { $Result->show("danger", _("Invalid widget"), true); }
 	# reset size and limit
diff --git a/app/dashboard/widgets/instructions.php b/app/dashboard/widgets/instructions.php
index e2cf67a8165c78fb8b1c1a321473474a340a268e..5226873879d6fde3bf18191777d9e52909ed3ef9 100644
--- a/app/dashboard/widgets/instructions.php
+++ b/app/dashboard/widgets/instructions.php
@@ -4,7 +4,7 @@
  **********************************************/
 
 # required functions
-if(!is_object(@$User)) {
+if(!isset($User)) {
 	require( dirname(__FILE__) . '/../../../functions/functions.php' );
 	# classes
 	$Database	= new Database_PDO;
@@ -35,7 +35,7 @@ $m = 0;
 $widget = $Tools->fetch_object ("widgets", "wfile", "instructions");
 
 # if direct request include plot JS
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
+if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest")	{
 	# get widget details
 	if(!$widget = $Tools->fetch_object ("widgets", "wfile", $_REQUEST['section'])) { $Result->show("danger", _("Invalid widget"), true); }
 	# reset size and limit
diff --git a/app/dashboard/widgets/ipcalc.php b/app/dashboard/widgets/ipcalc.php
index 0fe2ec66afe05d4816133bec80767c3fcc9bf9f0..d51c606a33128b22a68d44fe5618bba7c48082cf 100644
--- a/app/dashboard/widgets/ipcalc.php
+++ b/app/dashboard/widgets/ipcalc.php
@@ -1,6 +1,6 @@
 <?php
 # required functions
-if(!is_object(@$User)) {
+if(!isset($User)) {
 	require_once( dirname(__FILE__) . '/../../../functions/functions.php' );
 	# classes
 	$Database	= new Database_PDO;
@@ -14,7 +14,7 @@ if(!is_object(@$User)) {
 $User->check_user_session ();
 
 # if direct request that redirect to tools page
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
+if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest")	{
 	header("Location: ".create_link("tools", "ip-calculator"));
 }
 ?>
diff --git a/app/dashboard/widgets/iprequest.php b/app/dashboard/widgets/iprequest.php
index 46bb28115e176a7b21e2993f655d7e356322f003..495480b8ec735e4c493756eafd2cb436e7569e90 100644
--- a/app/dashboard/widgets/iprequest.php
+++ b/app/dashboard/widgets/iprequest.php
@@ -1,7 +1,7 @@
 <?php
 
 # required functions
-if(!is_object(@$User)) {
+if(!isset($User)) {
 	require_once( dirname(__FILE__) . '/../../../functions/functions.php' );
 	# classes
 	$Database	= new Database_PDO;
diff --git a/app/dashboard/widgets/locations.php b/app/dashboard/widgets/locations.php
index 561a73bf2e5d41ff580e2e689301b7d32ed4ad1a..f1f3c697f7a65bc1821f457d13da85412703a889 100644
--- a/app/dashboard/widgets/locations.php
+++ b/app/dashboard/widgets/locations.php
@@ -4,7 +4,7 @@
  **********************************************/
 
 # required functions
-if(!is_object(@$User)) {
+if(!isset($User)) {
 	require_once( dirname(__FILE__) . '/../../../functions/functions.php' );
 	# classes
 	$Database	= new Database_PDO;
diff --git a/app/dashboard/widgets/mac-lookup.php b/app/dashboard/widgets/mac-lookup.php
index d2d74fc0997be8518ffd5fde5239a92f9dff0409..534288d17e4362da4358cbcdeed51d02b82590f1 100644
--- a/app/dashboard/widgets/mac-lookup.php
+++ b/app/dashboard/widgets/mac-lookup.php
@@ -11,7 +11,7 @@ if (!isset($User)) {
 $User->check_user_session();
 
 # if direct request that redirect to tools page
-if ($_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest") {
+if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest") {
 	header("Location: " . create_link("tools", "mac-lookup"));
 }
 ?>
diff --git a/app/dashboard/widgets/requests.php b/app/dashboard/widgets/requests.php
index 8983a05fc6509e06eec10dc6a6e67f057c43c808..4504650f7de86a4f4085ac91168ebfd1e80ef45d 100755
--- a/app/dashboard/widgets/requests.php
+++ b/app/dashboard/widgets/requests.php
@@ -1,7 +1,7 @@
 <?php
 
 # required functions
-if(!is_object(@$User)) {
+if(!isset($User)) {
 	require_once( dirname(__FILE__) . '/../../../functions/functions.php' );
 	# classes
 	$Database	= new Database_PDO;
@@ -14,7 +14,7 @@ if(!is_object(@$User)) {
 $User->check_user_session ();
 
 # if direct request that redirect to tools page
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
+if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest")	{
 	header("Location: ".create_link("administration","requests"));
 }
 
diff --git a/app/dashboard/widgets/statistics.php b/app/dashboard/widgets/statistics.php
index 077b909c3f22811e1ab21b8fbfb94792b0836047..ee411602f21072984e5eb413341a267d93dc0ac0 100755
--- a/app/dashboard/widgets/statistics.php
+++ b/app/dashboard/widgets/statistics.php
@@ -1,7 +1,7 @@
 <?php
 
 # required functions
-if(!is_object(@$User)) {
+if(!isset($User)) {
 	require_once( dirname(__FILE__) . '/../../../functions/functions.php' );
 	# classes
 	$Database	= new Database_PDO;
diff --git a/app/dashboard/widgets/template.php b/app/dashboard/widgets/template.php
index 0ca1ceab40bfd58359b75c73653a1f32b195cb76..5ffdbeab25174fb4221a07b65c83157f4941802e 100755
--- a/app/dashboard/widgets/template.php
+++ b/app/dashboard/widgets/template.php
@@ -7,7 +7,7 @@ This is a template for creating new widgets
 */
 
 # required functions
-if(!is_object(@$User)) {
+if(!isset($User)) {
 	require_once( dirname(__FILE__) . '/../../../functions/functions.php' );
 	# classes
 	$Database	= new Database_PDO;
@@ -19,12 +19,12 @@ if(!is_object(@$User)) {
 $User->check_user_session ();
 
 # if direct request that redirect to tools page
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
+if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest")	{
 	header("Location: ".create_link("administration","logs"));
 }
 
 /* You can check who requested this, to adjust parameters  */
-if($_SERVER['HTTP_X_REQUESTED_WITH']=="XMLHttpRequest")	{ $dashboard = true; }
+if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == "XMLHttpRequest")	{ $dashboard = true; }
 else													{ $dashboard = false; }
 
 ?>
diff --git a/app/dashboard/widgets/threshold.php b/app/dashboard/widgets/threshold.php
index 249df6a52457e6bb372710af4fb445c82a9b6e4e..7ca02a9ccf072596f9bb848a94036fdb6bca10fe 100644
--- a/app/dashboard/widgets/threshold.php
+++ b/app/dashboard/widgets/threshold.php
@@ -6,7 +6,7 @@
  **********************************************/
 
 # required functions
-if(!is_object(@$User)) {
+if(!isset($User)) {
 	require_once( dirname(__FILE__) . '/../../../functions/functions.php' );
 	# classes
 	$Database	= new Database_PDO;
@@ -31,7 +31,7 @@ $height = 200;
 $slimit = 5;			//we dont need this, we will recalculate
 
 # if direct request include plot JS
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
+if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest")	{
 	# get widget details
 	if(!$widget = $Tools->fetch_object ("widgets", "wfile", $_GET['section'])) { $Result->show("danger", _("Invalid widget"), true); }
 	# reset size and limit
diff --git a/app/dashboard/widgets/tools.php b/app/dashboard/widgets/tools.php
index 5a487b1c6871ee88651dbd893c37066324d27b99..a489833bc8ab3bc994cb86bf0c270613bbf79d15 100644
--- a/app/dashboard/widgets/tools.php
+++ b/app/dashboard/widgets/tools.php
@@ -1,6 +1,6 @@
 <?php
 # required functions
-if(!is_object(@$User)) {
+if(!isset($User)) {
 	require_once( dirname(__FILE__) . '/../../../functions/functions.php' );
 	# classes
 	$Database	= new Database_PDO;
@@ -14,7 +14,7 @@ if(!is_object(@$User)) {
 $User->check_user_session ();
 
 # if direct request that redirect to tools page
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
+if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest")	{
 	header("Location: ".create_link("tools"));
 }
 
diff --git a/app/dashboard/widgets/top10_hosts_v4.php b/app/dashboard/widgets/top10_hosts_v4.php
index 70ae1baa1da45d4acd3115267baaa8cbebeb3fb7..f36d82a97f7e5236b2d753a682ce1f007e96d508 100755
--- a/app/dashboard/widgets/top10_hosts_v4.php
+++ b/app/dashboard/widgets/top10_hosts_v4.php
@@ -6,7 +6,7 @@
  **********************************************/
 
 # required functions
-if(!is_object(@$User)) {
+if(!isset($User)) {
 	require_once( dirname(__FILE__) . '/../../../functions/functions.php' );
 	# classes
 	$Database	= new Database_PDO;
@@ -27,7 +27,7 @@ $height = 200;
 $slimit = 10;			//we dont need this, we will recalculate
 
 # if direct request include plot JS
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
+if(!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
 	# get widget details
 	if(!$widget = $Tools->fetch_object ("widgets", "wfile", $_GET['section'])) { $Result->show("danger", _("Invalid widget"), true); }
 	# reset size and limit
diff --git a/app/dashboard/widgets/top10_hosts_v6.php b/app/dashboard/widgets/top10_hosts_v6.php
index fea498d2885930b2488cb6670f08039ed6b0ede8..b6ce5d6c91a2ff213aa10b05e3b7dddad32c0651 100755
--- a/app/dashboard/widgets/top10_hosts_v6.php
+++ b/app/dashboard/widgets/top10_hosts_v6.php
@@ -6,7 +6,7 @@
  **/
 
 # required functions
-if(!is_object(@$User)) {
+if(!isset($User)) {
 	require_once( dirname(__FILE__) . '/../../../functions/functions.php' );
 	# classes
 	$Database	= new Database_PDO;
@@ -27,7 +27,7 @@ $height = 200;
 $slimit = 10;			//we dont need this, we will recalculate
 
 # if direct request include plot JS
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
+if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest")	{
 	# get widget details
 	if(!$widget = $Tools->fetch_object ("widgets", "wfile", $_GET['section'])) { $Result->show("danger", _("Invalid widget"), true); }
 	# reset size and limit
diff --git a/app/dashboard/widgets/top10_percentage.php b/app/dashboard/widgets/top10_percentage.php
index ef449ac2c3706a9198afa72cf1318a8bc18b4985..46e92874f71aa89d54753b4822d700aaf5ae291f 100755
--- a/app/dashboard/widgets/top10_percentage.php
+++ b/app/dashboard/widgets/top10_percentage.php
@@ -4,7 +4,7 @@
  **********************************************/
 
 # required functions
-if(!is_object(@$User)) {
+if(!isset($User)) {
 	require_once( dirname(__FILE__) . '/../../../functions/functions.php' );
 	# classes
 	$Database	= new Database_PDO;
@@ -25,7 +25,7 @@ $height = 200;
 $slimit = 10;			//we dont need this, we will recalculate
 
 # if direct request include plot JS
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
+if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest")	{
 	# get widget details
 	if(!$widget = $Tools->fetch_object ("widgets", "wfile", $_GET['section'])) { $Result->show("danger", _("Invalid widget"), true); }
 	# reset size and limit
diff --git a/app/install/install-execute.php b/app/install/install-execute.php
index 2f7ff79ed5c3e5a93f26b386ac9ceaab6bf0b32f..c57cb3324ed703f380226a5a8d19055f0cc9044a 100755
--- a/app/install/install-execute.php
+++ b/app/install/install-execute.php
@@ -14,7 +14,7 @@ $Tools	 	= new Tools ($Database);
 $Result 	= new Result ();
 
 # make sure it is properly requested
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")						{ $Result->show("danger", _("Invalid request"), true); }
+if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest")						{ $Result->show("danger", _("Invalid request"), true); }
 
 # if already installed ignore!
 if($Install->check_table ("widgets", false) && @$_POST['dropdb']!="on") {
diff --git a/app/tools/locations/single-location-map.php b/app/tools/locations/single-location-map.php
index 9904b7a7575a6bedc8bbecfdb5b3b1e3c8a90878..0fefda0d51b4a1345c9af55b08f6419343bcd07a 100644
--- a/app/tools/locations/single-location-map.php
+++ b/app/tools/locations/single-location-map.php
@@ -8,7 +8,7 @@
 $User->check_user_session();
 
 # fetch location
-if(!$location) {
+if(!isset($location)) {
     $location = $Tools->fetch_object("locations", "id", $location_index);
 }
 
diff --git a/app/tools/racks/print-single-rack.php b/app/tools/racks/print-single-rack.php
index 3ac570b1653de1a8622096f98ca04732ce05d9fd..6358769f0b87b3d8b9bceec47a508b72cab6ab30 100755
--- a/app/tools/racks/print-single-rack.php
+++ b/app/tools/racks/print-single-rack.php
@@ -194,6 +194,7 @@ if ($User->settings->enableCustomers=="1" && $User->get_module_permissions ("cus
             reset($rack_contents);
             $prev = false;
             $is_back =  false;
+            $error = "";
             do {
                 if (!($cd = current($rack_devices))) {
                     $cur = current($rack_contents);
diff --git a/app/tools/vlan/vlan-details.php b/app/tools/vlan/vlan-details.php
index 6b0a298cb40af85b51d975597dc4455a7eb4a40b..e4d9ff86be7dca30b94ce49825c1ca8f324e9310 100755
--- a/app/tools/vlan/vlan-details.php
+++ b/app/tools/vlan/vlan-details.php
@@ -11,6 +11,9 @@ $User->check_module_permissions ("vlan", User::ACCESS_R, true, false);
 # get VLAN details
 $vlan = (array) $Tools->fetch_object("vlans", "vlanId", $_GET['sPage']);
 
+# not existing
+if(!isset($vlan['domainId']))		{ $Result->show("danger", _('Invalid VLAN id'), true); }
+
 # fetch l2 domain
 $vlan_domain = $Tools->fetch_object("vlanDomains", "id", $vlan['domainId']);
 if($vlan_domain===false)			{ $Result->show("danger", _("Invalid ID"), true); }
@@ -18,9 +21,6 @@ if($vlan_domain===false)			{ $Result->show("danger", _("Invalid ID"), true); }
 # Check user has read level permission to l2domain (or die with warning)
 $User->check_l2domain_permissions($vlan_domain);
 
-# not existing
-if($vlan[0]===false)				{ $Result->show("danger", _('Invalid VLAN id'), true); }
-
 # get custom VLAN fields
 $custom_fields = $Tools->fetch_custom_fields('vlans');
 
diff --git a/app/tools/vrf/vrf-subnets.php b/app/tools/vrf/vrf-subnets.php
index 99274af19f4d0897cfdf1a5b1bb4c95fb6d82b23..52910131dd94ba2ac90853b537560aa73468404f 100644
--- a/app/tools/vrf/vrf-subnets.php
+++ b/app/tools/vrf/vrf-subnets.php
@@ -59,7 +59,7 @@ else {
 
 			print "<tr>";
 			if($User->get_module_permissions ("vlan")>=User::ACCESS_R)
-		    print "	<td><a href='".create_link("tools","vlan", $vlan->domainId, $vlan->vlanId)."'><span class='badge badge1'>$vlan->number</span></a></td>";
+			print is_object($vlan) ? "	<td><a href='".create_link("tools","vlan", $vlan->domainId, $vlan->vlanId)."'><span class='badge badge1'>$vlan->number</span></a></td>" : "<td></td>";
 		    print "	<td class='small description'><a href='".create_link("subnets",$subnet['sectionId'],$subnet['id'])."'>$subnet[description]</a></td>";
 		    print "	<td><a href='".create_link("subnets",$subnet['sectionId'],$subnet['id'])."'>".$Subnets->transform_address($subnet['subnet'], "dotted")."/$subnet[mask] $fullinfo</a></td>";
 
diff --git a/functions/checks/check_php_build.php b/functions/checks/check_php_build.php
index 54c364c510b8639fa0abccea14c36177c97bcb6e..b88cd21eb5f9b2e7cad8850e0832e09cceda6627 100755
--- a/functions/checks/check_php_build.php
+++ b/functions/checks/check_php_build.php
@@ -15,7 +15,7 @@ if(!defined('PHPIPAM_PHP_MIN'))
 define('PHPIPAM_PHP_MIN', "5.4");
 
 if(!defined('PHPIPAM_PHP_UNTESTED'))
-define('PHPIPAM_PHP_UNTESTED', "8.3");  // PHP 8.3 or greater is untested & unsupported
+define('PHPIPAM_PHP_UNTESTED', "8.2");  // PHP 8.2 or greater is untested & unsupported
 
 
 # Empty missing arrays to prevent errors
diff --git a/functions/classes/class.Common.php b/functions/classes/class.Common.php
index ff42444a170e11cc9b3c90ba8f71890d07fa3e23..96055336e3e5aadf3160feab6a9e1cff1cc5f5a7 100644
--- a/functions/classes/class.Common.php
+++ b/functions/classes/class.Common.php
@@ -903,7 +903,7 @@ class Common_functions  {
 	    $hms = "";
 
 	    // get the number of hours
-	    $hours = intval(intval($sec) / 3600);
+	    $hours = intval($sec / 3600);
 
 	    // add to $hms, with a leading 0 if asked for
 	    $hms .= ($padHours)
@@ -911,13 +911,13 @@ class Common_functions  {
 	          : $hours. ':';
 
 	    // get the seconds
-	    $minutes = intval(($sec / 60) % 60);
+	    $minutes = intval($sec / 60) % 60;
 
 	    // then add to $hms (with a leading 0 if needed)
 	    $hms .= str_pad($minutes, 2, "0", STR_PAD_LEFT). ':';
 
 	    // seconds
-	    $seconds = intval($sec % 60);
+	    $seconds = intval($sec) % 60;
 
 	    // add to $hms, again with a leading 0 if needed
 	    $hms .= str_pad($seconds, 2, "0", STR_PAD_LEFT);
diff --git a/functions/classes/class.User.php b/functions/classes/class.User.php
index cbdce30199330f4150ee7e84ff47aa254fb223f3..263af2bde30c40232c8f65b8830b059da7082201 100644
--- a/functions/classes/class.User.php
+++ b/functions/classes/class.User.php
@@ -371,7 +371,7 @@ class User extends Common_functions {
         # not authenticated
         if($this->authenticated===false) {
             # error print for AJAX
-            if(@$_SERVER['HTTP_X_REQUESTED_WITH'] == "XMLHttpRequest") {
+            if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == "XMLHttpRequest") {
                 # for AJAX always check origin
                 $this->check_referrer ();
                 # kill session
@@ -603,7 +603,7 @@ class User extends Common_functions {
      * @return void
      */
     private function check_referrer () {
-        if ( ($_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest") && ($_SERVER['HTTP_ORIGIN'] != $_SERVER['HTTP_HOST'] ) ) {
+        if ( (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest") && ($_SERVER['HTTP_ORIGIN'] != $_SERVER['HTTP_HOST'] ) ) {
             # write log and die
             $this->Log->write ("referrer_check", _('Page not referred properly'), 0 );
             $this->Result->show ("danger", _('Page not referred properly'), true);