Permalink
Browse files

Fix hydration with empty search results

  • Loading branch information...
1 parent fe83ec0 commit c5733de48d4a06f52818cccfe996fb336ea3f552 @MrHash MrHash committed Apr 29, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Doctrine/Search/Query.php
@@ -198,7 +198,7 @@ public function getResult($hydrationMode = null)
$ids = array_map(function($result) { return $result->getId(); }, $results);
return $this->getHydrationQuery()
- ->setParameter($this->hydrationParameter, $ids)
+ ->setParameter($this->hydrationParameter, $ids ?: null)
->useResultCache($this->useResultCache, $this->cacheLifetime)
->getResult($this->hydrationMode);
}

0 comments on commit c5733de

Please sign in to comment.