Skip to content
This repository has been archived by the owner on Nov 11, 2020. It is now read-only.

Commit

Permalink
Fix event argument order when dispatching collectionPreNear
Browse files Browse the repository at this point in the history
  • Loading branch information
Koji Iwazaki authored and jmikola committed Jul 12, 2012
1 parent 6637851 commit afff46e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Doctrine/MongoDB/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit afff46e

Please sign in to comment.