Skip to content

Commit e1f3249

Browse files
authored
Fix snmp_session_error.phpt for 32bit machines (GH-17611)
For `$retries === PHP_INT_MAX` there is no exception on 32bit machines. To avoid splitting the tests, or even not running it on 32bit, we work around.
1 parent b667939 commit e1f3249

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/snmp/tests/snmp_session_error.phpt

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ try {
3535
}
3636
try {
3737
new SNMP(SNMP::VERSION_1, "$hostname:$port", $community, $timeout, PHP_INT_MAX);
38+
echo PHP_INT_SIZE, "\n"; // no exception on 32bit machines
3839
} catch (\ValueError $e) {
3940
echo $e->getMessage(), PHP_EOL;
4041
}
@@ -60,7 +61,7 @@ SNMP::__construct(): Argument #2 ($hostname) remote port must be between 0 and 6
6061
SNMP::__construct(): Argument #2 ($hostname) remote port must be between 0 and 65535
6162
SNMP::__construct(): Argument #2 ($hostname) length must be lower than 128
6263
SNMP::__construct(): Argument #4 ($timeout) must be between -1 and %d
63-
SNMP::__construct(): Argument #5 ($retries) must be between -1 and %d
64+
%r(SNMP::__construct\(\): Argument #5 \(\$retries\) must be between -1 and %d|4)%r
6465
SNMP::__construct(): Argument #2 ($hostname) must not contain any null bytes
6566
SNMP::__construct(): Argument #3 ($community) must not be empty
6667
SNMP::__construct(): Argument #3 ($community) must not contain any null bytes

0 commit comments

Comments
 (0)