Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d2832bf

Browse files
We need to return immediately from our variant reply parsing
function if we get a protocol error, rather than just throwing and exception and breaking execution of the loop. Addresses phpredis#437
1 parent 9278263 commit d2832bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1824,7 +1824,7 @@ redis_read_variant_reply(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, zv
18241824
default:
18251825
// Protocol error
18261826
zend_throw_exception_ex(redis_exception_ce, 0 TSRMLS_CC, "protocol error, got '%c' as reply-type byte\n", reply_type);
1827-
break;
1827+
return FAILURE;
18281828
}
18291829

18301830
IF_MULTI_OR_PIPELINE() {

0 commit comments

Comments
 (0)