Skip to content

ext/snmp: promote invalid-input warnings to ValueError#21319

Open
prateekbhujel wants to merge 1 commit intophp:masterfrom
prateekbhujel:prateek/fix-snmp-valueerror-21318
Open

ext/snmp: promote invalid-input warnings to ValueError#21319
prateekbhujel wants to merge 1 commit intophp:masterfrom
prateekbhujel:prateek/fix-snmp-valueerror-21318

Conversation

@prateekbhujel
Copy link

This addresses #21318 by promoting remaining invalid-input warning paths in ext/snmp to ValueError for consistency with PHP 8+ argument validation behavior.

Changed paths:

  • Malformed IPv6 host (snmp_session_init)
  • Missing type/value in OID arrays (php_snmp_parse_oid)
  • Invalid contextEngineID (snmp_session_set_contextEngineID)

Tests updated accordingly:

  • ext/snmp/tests/ipv6.phpt
  • ext/snmp/tests/snmpset.phpt
  • ext/snmp/tests/snmp2_set.phpt
  • ext/snmp/tests/snmp-object-setSecurity_error.phpt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant