It's not very often that you come across a bug in your code where, after tracking down the source of the problem, you're pleased that the bug exists.
According to the documentation on redis.io, the hgetall command returns all the fields and values of a hash at the given key. However, the command result is a list where each field is followed by the corresponding value.
I assumed that calling this method in predis would return a result formatted the same way and I baked this assumption into my code.
When I hit an endpoint that executed this code for the first time the api returned an error response and I could see an exception in my log file. Looking more closely at the stack trace, I could see that Mabel was attempting to access numeric array indexes that didn't exist.
I threw in some logging and saw that, contrary to my earlier assumption, predis was automatically translating the result of the hgetall command into an associative array.
This is great news. I didn't mind working with the result format described in the redis.io documentation, but I knew that if I were dealing with larger hashes I might start to run into problems. Working with associative arrays is much easier.
So yeah, sometimes a bug in your code can be a good thing.