$aPlace = $this->lookupPolygon($sPointSQL, $iMaxRank);
if ($aPlace) {
$oResult = new Result($aPlace['place_id']);
- } else {
+ } elseif(!$aPlace && $iMaxRank > 4) {
$aPlace = $this->noPolygonFound($sPointSQL, $iMaxRank);
if ($aPlace) {
$oResult = new Result($aPlace['place_id']);
$aPlace = $this->lookupPolygon($sPointSQL, $iMaxRank);
if ($aPlace) {
$oResult = new Result($aPlace['place_id']);
- } else {
+ } elseif(!$aPlace && $iMaxRank > 4) {
$aPlace = $this->noPolygonFound($sPointSQL, $iMaxRank);
if ($aPlace) {
$oResult = new Result($aPlace['place_id']);