Please sign in to comment.
Fix fatal errors when combining mapReduce() + first()
Query::first() relies on the one() method being implemented. The ResultSetDecorator class that wrapps a MapReduce object does not support this method resulting in a fatal error. Since we can't rely on ArrayAccess or other array like interfaces being implemented we need to convert the decorated Traversable into an array before we can pull single results off.
- Loading branch information...
Showing with 73 additions and 8 deletions.