Fix compilation error. #543

This commit is contained in:
Korina Cordero 2021-03-12 07:02:26 +00:00
parent 9a6ca7ae5d
commit d812e34797

View file

@ -306,7 +306,7 @@ class HubSelector
protected function getClosestHubsWithTime(Point $point, $limit_results, $limit_distance, $date_time)
{
// get closest hubs that are open at the given time based on st_distance function from db
$query = $this->em->createQuery('SELECT h, st_distance(h.coordinates, point(:lng, :lat)) as dist FROM App\Entity\Hub h' . ($time ? ' WHERE :time BETWEEN h.time_open AND h.time_close' : '') . ' ORDER BY dist')
$query = $this->em->createQuery('SELECT h, st_distance(h.coordinates, point(:lng, :lat)) as dist FROM App\Entity\Hub h' . ($time ? ' WHERE :time BETWEEN h.time_open AND h.time_close' : '') . ' ORDER BY dist');
$query = $this->em->createQuery($query_string)
->setParameter('lat', $point->getLatitude())