Skip to content

Commit 70dab5d

Browse files
committed
Fix SNMP SKIPIF
1 parent 060117f commit 70dab5d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/snmp/tests/skipif.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@ require_once (dirname(__FILE__).'/snmp_include.inc');
66
//snmpget ( string $hostname , string $community ,
77
//string $object_id [, int $timeout [, int $retries ]] )
88

9+
// net-snmp will just log to STDERR without asking. Close STDERR to prevent
10+
// the error output from marking the SKIPIF section as BORKed.
11+
fclose(STDERR);
912
if (@snmpget($hostname, $community, '.1.3.6.1.2.1.1.1.0', $timeout) === false)
1013
die('skip NO SNMPD on this host or community invalid');

0 commit comments

Comments
 (0)