[php-src] PR #25368: Fix the timeout argument number in snmp3_set() errors

From: Date: Tue, 10 Nov 2026 13:26:18 +0000
Subject: [php-src] PR #25368: Fix the timeout argument number in snmp3_set() errors
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-40507@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/25368 Author: lacatoire snmp3_set() names the wrong argument when $timeout or $retries is invalid: $timeout is argument #11 and $retries argument #12, but the errors cite #10 and #11. ### To reproduce ```php <?php $oid = '.1.3.6.1.2.1.1.5.0'; foreach ([[-2, 1], [100, -2]] as [$timeout, $retries]) { try { snmp3_set('127.0.0.1', 'user', 'noAuthNoPriv', '', '', '', '', $oid, 's', 'x', $timeout, $retries); } catch (Throwable $e) { echo $e::class, ': ', $e->getMessage(), "\n"; } } ``` Before (8.5.12): ``` ValueError: snmp3_set(): Argument #10 ($value) must be between -1 and 9223372036854775807 ValueError: snmp3_set(): Argument #11 ($timeout) must be between -1 and 2147483647 ``` After: ``` ValueError: snmp3_set(): Argument #11 ($timeout) must be between -1 and 9223372036854775807 ValueError: snmp3_set(): Argument #12 ($retries) must be between -1 and 2147483647 ```

« previous php.git-pulls (#40507) next »