mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
set exception handler by request format, not always HTML
This commit is contained in:
committed by
Marc Tobias Metten
parent
2467e9996e
commit
e4a51e460e
@@ -27,6 +27,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);
|
||||
|
||||
Reference in New Issue
Block a user