X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/7a964efb3a104e304be7620dc18fa123559f05c8..75f951d254127d8857b6ad95cac241917f88e542:/website/search.php diff --git a/website/search.php b/website/search.php old mode 100755 new mode 100644 index 0ebf1814..a9bb3f0b --- a/website/search.php +++ b/website/search.php @@ -1,14 +1,13 @@ connect(); $oParams = new Nominatim\ParameterParser(); $oGeocode = new Nominatim\Geocode($oDB); @@ -27,6 +26,7 @@ if (CONST_Search_ReversePlanForAll // Format for output $sOutputFormat = $oParams->getSet('format', array('html', 'xml', 'json', 'jsonv2', 'geojson', 'geocodejson'), 'html'); +set_exception_handler_by_format($sOutputFormat); $sForcedGeometry = ($sOutputFormat == 'html') ? 'geojson' : null; $oGeocode->loadParamArray($oParams, $sForcedGeometry);