From 838511b707990e9dc5a75e2d97004c0045424b4d Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 1 Jan 2021 16:34:00 +0100 Subject: Simplify sp_match_array_value --- src/sp_utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') 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, ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(arr), value) { if (Z_TYPE_P(value) != IS_ARRAY) { - const zend_string* value_str = sp_zval_to_zend_string(value); - if (sp_match_value(value_str, to_match, rx)) { + if (sp_match_value(sp_zval_to_zend_string(value), to_match, rx)) { return true; - } else { } } else if (sp_match_array_value(value, to_match, rx)) { return true; -- cgit v1.3