]> git.openstreetmap.org Git - nominatim.git/commit
always use object type for details keywords
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 17 May 2021 14:36:32 +0000 (16:36 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 17 May 2021 14:36:32 +0000 (16:36 +0200)
commitfef1bbb1a77477867e9f20da4c473d880675e0e7
treea146776a2230d413b7670c4b056fb5def6d892d3
parent925726222f76a3cc73263bd56ef593afaa83c865
always use object type for details keywords

When name and address is empty, the keywords field in the response
of the details API would be an array because that is what PHP's
json_encode defaults to with empty array(). This default can only
be changed globally per json_encode call and that might cause
unintended colleteral damage. Work around the issue by making
name and address an empty array instead of keywords.

Fixes #2329.
lib-php/template/details-json.php