Fix protocol break with hgetall and family

Former-commit-id: 42202c868dc24bf5d4a65cd42da2ef38be450a56
This commit is contained in:
John Sully 2019-04-08 13:52:02 -04:00
parent 68bec6f239
commit 90f6b22128

View File

@ -772,7 +772,7 @@ void genericHgetallCommand(client *c, int flags) {
hashTypeIterator *hi; hashTypeIterator *hi;
int length, count = 0; int length, count = 0;
if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.null[c->resp])) == NULL if ((o = lookupKeyReadOrReply(c,c->argv[1],(c->resp < 3) ? shared.emptyarray : shared.null[c->resp])) == NULL
|| checkType(c,o,OBJ_HASH)) return; || checkType(c,o,OBJ_HASH)) return;
/* We return a map if the user requested keys and values, like in the /* We return a map if the user requested keys and values, like in the