summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2021-01-01 16:34:00 +0100
committerjvoisin2021-01-01 16:34:00 +0100
commit838511b707990e9dc5a75e2d97004c0045424b4d (patch)
tree778d99f6b43752dfd2d199a227012eb64bb4143c
parent837fbdb88a513500520f057d27bdfedd0d3995ca (diff)
Simplify sp_match_array_value
-rw-r--r--src/sp_utils.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/sp_utils.c b/src/sp_utils.c
index 04074bf..4d66d3c 100644
--- a/src/sp_utils.c
+++ b/src/sp_utils.c
@@ -368,10 +368,8 @@ bool sp_match_array_value(const zval* arr, const zend_string* to_match,
368 368
369 ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(arr), value) { 369 ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(arr), value) {
370 if (Z_TYPE_P(value) != IS_ARRAY) { 370 if (Z_TYPE_P(value) != IS_ARRAY) {
371 const zend_string* value_str = sp_zval_to_zend_string(value); 371 if (sp_match_value(sp_zval_to_zend_string(value), to_match, rx)) {
372 if (sp_match_value(value_str, to_match, rx)) {
373 return true; 372 return true;
374 } else {
375 } 373 }
376 } else if (sp_match_array_value(value, to_match, rx)) { 374 } else if (sp_match_array_value(value, to_match, rx)) {
377 return true; 375 return true;