nicolasff/phpredis — pull request #272 by pepve (2012-11-16 09:55:21+00:00)
Title: Brpoplpush timeout replies

Brpoplpush timeout replies weren't handled correctly. When a user would call `Redis::brpoplpush()` and a timeout happened, the string `*-1` was returned. With this fix it returns boolean `false`, as expected.

When the list given to brpoplpush has an element or receives an element before the timeout. That element is returned as a bulk reply. When the list stays empty until the timeout Redis returns a null multi bulk reply. This is different from rpoplpush, which always returns a bulk reply (null or with content). And it is different from brpop/blpop, they always return a multi bulk reply (null or with the key name, content pair).

My proposed fix is a quick one. The alternative would be untangling the brpoplpush and rpoplpush commands. They are now handled in much the same way, but they have very incompatible reply types.