Skip to content

Commit

Permalink
Resetting array pointer instead of using current location
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Jun 11, 2013
1 parent 6aa7319 commit e582bab
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ protected function findItem($data, array $identifierNames, $identifier)
$data = new ArrayCollection(ArrayUtils::iteratorToArray($data));
}

$found = $data->matching(new Criteria(Criteria::expr()->eq(current($identifierNames), $identifier)));
$found = $data->matching(new Criteria(Criteria::expr()->eq(reset($identifierNames), $identifier)));

return $found->isEmpty() ? null : $found->first();
}
Expand Down

0 comments on commit e582bab

Please sign in to comment.