We get a PHP Fatal Error, if the geolocate service is not available or the request fails.
The problem is, that Evoweb\StoreFinder\Domain\Repository\LocationRepository::findByConstraint delivers an array, if the constraint is not geolocated. But the function should deliver an \TYPO3\CMS\Extbase\Persistence\QueryResultInterface and not an array. Therefore we call ->count() on an array and this is not definded (e.g. \Evoweb\StoreFinder\Controller\MapController::mapAction line 114)
Solution is to return a query without result instead of an array or to check before the count function, if we have an \TYPO3\CMS\Extbase\Persistence\QueryResultInterface.
We get a PHP Fatal Error, if the geolocate service is not available or the request fails.
The problem is, that Evoweb\StoreFinder\Domain\Repository\LocationRepository::findByConstraint delivers an array, if the constraint is not geolocated. But the function should deliver an \TYPO3\CMS\Extbase\Persistence\QueryResultInterface and not an array. Therefore we call ->count() on an array and this is not definded (e.g. \Evoweb\StoreFinder\Controller\MapController::mapAction line 114)
Solution is to return a query without result instead of an array or to check before the count function, if we have an \TYPO3\CMS\Extbase\Persistence\QueryResultInterface.