php-memcached-dev/php-memcached — pull request #75 by trvrnrth (2013-05-07 16:24:12+00:00)
Title: Ensure that Memcached::get fetches all results available

This supersedes pull request #4 taking advantage of the improvements made by @blat in pull request #74. This resolves the bug described in issue #14.

Previously only the first result was fetched after the memcached_mget_by_key call resulting in a RES_END result being left on the stack. As per the [libmemcached documentation](http://docs.libmemcached.org/memcached_get.html#description) memcached_fetch_result should be called until it returns NULL following a multi-get.

In some circumstances this is not noticeable as libmemcached takes care of flushing the receive buffers accordingly, however certain subsequent operations will incorrectly return the left-over RES_END result.