summaryrefslogtreecommitdiff
path: root/ext/snmp/snmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/snmp/snmp.c')
-rw-r--r--ext/snmp/snmp.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index 8e89c4d4f9..5f34ac4fcb 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -1807,19 +1807,14 @@ PHP_METHOD(snmp, __construct)
zend_long retries = SNMP_DEFAULT_RETRIES;
zend_long version = SNMP_DEFAULT_VERSION;
int argc = ZEND_NUM_ARGS();
- zend_error_handling error_handling;
snmp_object = Z_SNMP_P(object);
- zend_replace_error_handling(EH_THROW, NULL, &error_handling);
- if (zend_parse_parameters(argc, "lss|ll", &version, &a1, &a1_len, &a2, &a2_len, &timeout, &retries) == FAILURE) {
- zend_restore_error_handling(&error_handling);
+ if (zend_parse_parameters_throw(argc, "lss|ll", &version, &a1, &a1_len, &a2, &a2_len, &timeout, &retries) == FAILURE) {
return;
}
- zend_restore_error_handling(&error_handling);
-
- switch(version) {
+ switch (version) {
case SNMP_VERSION_1:
case SNMP_VERSION_2c:
case SNMP_VERSION_3: