From 57d99a3329855094acf1a662a8a7d1b81dbd5938 Mon Sep 17 00:00:00 2001 From: spezialist1 Date: Fri, 16 Sep 2022 16:24:42 +0300 Subject: [PATCH] The left-associativity of the ternary operator has been deprecated in PHP 7.4. Multiple consecutive ternaries detected. Use parenthesis to clarify the order in which the operations! FILE: classes/Device.class.php ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 369 | WARNING | The left-associativity of the ternary operator has been deprecated in PHP 7.4. Multiple consecutive ternaries detected. Use parenthesis to clarify the order in which the operations | | should be executed ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --- classes/Device.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Device.class.php b/classes/Device.class.php index edc54fd32..0b8edc4da 100644 --- a/classes/Device.class.php +++ b/classes/Device.class.php @@ -366,7 +366,7 @@ static function OSS_SNMP_Lookup($dev,$snmplookup,$oid=null,$walk=false){ $snmpHost=new OSS_SNMP\SNMP($dev->PrimaryIP,$dev->SNMPCommunity,$dev->SNMPVersion,$dev->v3SecurityLevel,$dev->v3AuthProtocol,$dev->v3AuthPassphrase,$dev->v3PrivProtocol,$dev->v3PrivPassphrase); $snmpresult=false; try { - $snmpresult=(is_null($oid))?$snmpHost->useSystem()->$snmplookup(true):($walk)?$snmpHost->realWalk($oid):$snmpHost->get($oid); + $snmpresult=(is_null($oid))?$snmpHost->useSystem()->$snmplookup(true):(($walk)?$snmpHost->realWalk($oid):$snmpHost->get($oid)); }catch (Exception $e){ $dev->IncrementFailures(); error_log("Device::$caller($dev->DeviceID) ".$e->getMessage());