From d812e347979c05577427d57e56093d4925042e19 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Fri, 12 Mar 2021 07:02:26 +0000 Subject: [PATCH] Fix compilation error. #543 --- src/Service/HubSelector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/HubSelector.php b/src/Service/HubSelector.php index 6773f0d8..3ab1eb90 100644 --- a/src/Service/HubSelector.php +++ b/src/Service/HubSelector.php @@ -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())