8000 Fixes bug when checking for failure in php_stream_gets · jrtkcoder/phpredis@c32e2fe · GitHub
[go: up one dir, main page]

Skip to content

Commit c32e2fe

Browse files
Fixes bug when checking for failure in php_stream_gets
Addresses phpredis#672
1 parent 54b9a0e commit c32e2fe

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
@@ -2161,7 +2161,7 @@ redis_read_reply_type(RedisSock *redis_sock, REDIS_REPLY_TYPE *reply_type,
21612161
char inbuf[255];
21622162

21632163
/* Read up to our newline */
2164-
if(php_stream_gets(redis_sock->stream, inbuf, sizeof(inbuf)) < 0) {
2164+
if(php_stream_gets(redis_sock->stream, inbuf, sizeof(inbuf)) == NULL) {
21652165
return -1;
21662166
}
21672167

0 commit comments

Comments
 (0)
0