Closed
Description
Bug Report
Q | A |
---|---|
BC Break | no |
Version | 1.6.2 |
Summary
Two methods
Doctrine\MongoDB\Query\Expr::popFirst()
Doctrine\MongoDB\Query\Expr::popLast()
use wrong $pop value.
Current behavior
according to mongodb manual
The $pop operator removes the first or last element of an array. Pass $pop a value of -1 to remove the first element of an array and 1 to remove the last element in an array.
pop first is -1, pop last is 1,
in the code is just reversed.