From dc402cb0fcb45590beea9811d32234b22c6b7e30 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 9 Apr 2021 18:53:31 +0100 Subject: [PATCH] Fix SNMP This one had objid_query->array_output = ( (st & SNMP_CMD_SET) ? false : true ); initially which means that if it was equal to 0 it would be equal to true. --- ext/snmp/snmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index 84832c1c419..ae41a8d5351 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -695,7 +695,7 @@ static bool php_snmp_parse_oid( return false; } objid_query->vars = (snmpobjarg *)safe_emalloc(sizeof(snmpobjarg), zend_hash_num_elements(oid_ht), 0); - objid_query->array_output = (st & SNMP_CMD_SET) != 0; + objid_query->array_output = (st & SNMP_CMD_SET) == 0; ZEND_HASH_FOREACH_VAL(oid_ht, tmp_oid) { convert_to_string(tmp_oid); objid_query->vars[objid_query->count].oid = Z_STRVAL_P(tmp_oid);