Skip to content

Commit

Permalink
Additional Fixes for #4688 - PHP 8.2 Support
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWitness committed Jul 20, 2022
1 parent aaa502f commit b58327e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions include/vendor/phpsnmp/classSNMP.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class SNMP {
public $enum_print;
public $quick_print;
public $oid_increasing_check;
public $bulk_walk_size;

private $version;
private $hostname;
Expand Down
5 changes: 3 additions & 2 deletions lib/ping.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Net_Ping
{
var $socket;
var $host;
var $port;
var $ping_status;
var $ping_response;
var $snmp_status;
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit b58327e

Please sign in to comment.