From b58327ed4fa6bff0068eadf07756dbe5c67b1e8d Mon Sep 17 00:00:00 2001 From: TheWitness Date: Tue, 19 Jul 2022 23:02:04 -0400 Subject: [PATCH] Additional Fixes for #4688 - PHP 8.2 Support --- include/vendor/phpsnmp/classSNMP.php | 1 + lib/ping.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/vendor/phpsnmp/classSNMP.php b/include/vendor/phpsnmp/classSNMP.php index 160cc22898..6201e7e6c4 100644 --- a/include/vendor/phpsnmp/classSNMP.php +++ b/include/vendor/phpsnmp/classSNMP.php @@ -46,6 +46,7 @@ class SNMP { public $enum_print; public $quick_print; public $oid_increasing_check; + public $bulk_walk_size; private $version; private $hostname; diff --git a/lib/ping.php b/lib/ping.php index e767c4b463..05b7fc07c2 100644 --- a/lib/ping.php +++ b/lib/ping.php @@ -26,6 +26,7 @@ class Net_Ping { var $socket; var $host; + var $port; var $ping_status; var $ping_response; var $snmp_status; @@ -422,10 +423,10 @@ function ping_udp() { /* get the end time after the packet was received */ $this->time = $this->get_time($this->precision); - + $errno = socket_last_error($this->socket); socket_clear_error($this->socket); - if (($code == -1 || empty($code)) && + if (($code == -1 || empty($code)) && ($errno == EHOSTUNREACH || $errno == ECONNRESET || $errno == ECONNREFUSED)) { /* set the return message */