Permalink
Browse files

Fix event argument order when dispatching collectionPreNear

  • Loading branch information...
1 parent 6637851 commit afff46ecd65731fb7df97e5060e7a81a2d9ba1fa Koji Iwazaki committed with jmikola Jul 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Doctrine/MongoDB/Collection.php
@@ -330,7 +330,7 @@ protected function doFindAndUpdate(array $query, array $newObj, array $options)
public function near(array $near, array $query = array(), array $options = array())
{
if ($this->eventManager->hasListeners(Events::preNear)) {
- $this->eventManager->dispatchEvent(Events::preNear, new NearEventArgs($this, $near, $query));
+ $this->eventManager->dispatchEvent(Events::preNear, new NearEventArgs($this, $query, $near));
}
$result = $this->doNear($near, $query, $options);

0 comments on commit afff46e

Please sign in to comment.