@@ -439,7 +439,7 @@ int redis_zrangebyscore_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
439439 ZEND_HASH_FOREACH_KEY_VAL (ht_opt , idx , zkey , z_ele ) {
440440 /* All options require a string key type */
441441 if (!zkey ) continue ;
442-
442+ ZVAL_DEREF ( z_ele );
443443 /* Check for withscores and limit */
444444 if (IS_WITHSCORES_ARG (zkey -> val , zkey -> len )) {
445445 * withscores = zval_is_true (z_ele );
@@ -587,7 +587,7 @@ int redis_zinter_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
587587 // Process our weights
588588 ZEND_HASH_FOREACH_VAL (ht_weights , z_ele ) {
589589 // Ignore non numeric args unless they're inf/-inf
590-
590+ ZVAL_DEREF ( z_ele );
591591 switch (Z_TYPE_P (z_ele )) {
592592 case IS_LONG :
593593 redis_cmd_append_sstr_long (& cmdstr , Z_LVAL_P (z_ele ));
@@ -1146,6 +1146,7 @@ int redis_set_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
11461146
11471147 /* Iterate our option array */
11481148 ZEND_HASH_FOREACH_KEY_VAL (kt , idx , zkey , v ) {
1149+ ZVAL_DEREF (v );
11491150 /* Detect PX or EX argument and validate timeout */
11501151 if (zkey && IS_EX_PX_ARG (zkey -> val )) {
11511152 /* Set expire type */
@@ -1381,6 +1382,7 @@ int redis_hmget_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
13811382
13821383 // Iterate over our member array
13831384 ZEND_HASH_FOREACH_VAL (ht_arr , z_mem ) {
1385+ ZVAL_DEREF (z_mem );
13841386 // We can only handle string or long values here
13851387 if ((Z_TYPE_P (z_mem ) == IS_STRING && Z_STRLEN_P (z_mem ) > 0 )
13861388 || Z_TYPE_P (z_mem ) == IS_LONG
@@ -2539,6 +2541,7 @@ static void get_georadius_opts(HashTable *ht, int *withcoord, int *withdist,
25392541
25402542 /* Iterate over our argument array, collating which ones we have */
25412543 ZEND_HASH_FOREACH_KEY_VAL (ht , idx , zkey , optval ) {
2544+ ZVAL_DEREF (optval );
25422545 /* If the key is numeric it's a non value option */
25432546 if (zkey ) {
25442547 if (zkey -> len == 5 && !strcasecmp (zkey -> val , "count" ) && Z_TYPE_P (optval ) == IS_LONG ) {
0 commit comments