Skip to content

Commit 7f27e2e

Browse files
Fixes bug when checking for failure in php_stream_gets
Addresses phpredis#672
1 parent 5aa251f commit 7f27e2e

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

22542254
/* Read up to our newline */
2255-
if(php_stream_gets(redis_sock->stream, inbuf, sizeof(inbuf)) < 0) {
2255+
if(php_stream_gets(redis_sock->stream, inbuf, sizeof(inbuf)) == NULL) {
22562256
return -1;
22572257
}
22582258

0 commit comments

Comments
 (0)