Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct issue with invalid "hash" value
[WARNING] This commit needs an update of existing database and change the GeoJSON output (see keywords change). The "hash" and "parentHash" keys from the keywords property are strings generated by a md5 cut at 15 characters. The "hash" is used as the key for the associative keywords property. In rare case the "hash" is a string of numbers only (e.g. for state:zavaska, the "hash" is "419424100927284"). As the key of associative array, PHP interprets this as an integer even if it's casted as string. To avoid this issue, we changed the keywords structure as follow : Previous structure : "keywords": { "bce097de57d1ab7": { "name": "Europe", "normalized": "europe", "type": "continent", "href": "http:\/\/resto.mapshup.com\/2.1\/api\/collections\/search.json?&lang=en&q=Europe" }, "936bcbcf5c43fbd": { "name": "France", "normalized": "france", "type": "country", "parentHash": "bce097de57d1ab7", "value": 83.78, "gcover": 5.79, "href": "http:\/\/resto.mapshup.com\/2.1\/api\/collections\/search.json?&lang=en&q=France" } } New structure : "keywords": [ { "id":"bce097de57d1ab7", "name": "Europe", "normalized": "europe", "type": "continent", "href": "http:\/\/resto.mapshup.com\/2.1\/api\/collections\/search.json?&lang=en&q=Europe" }, { "id":"936bcbcf5c43fbd", "name": "France", "normalized": "france", "type": "country", "parentHash": "bce097de57d1ab7", "value": 83.78, "gcover": 5.79, "href": "http:\/\/resto.mapshup.com\/2.1\/api\/collections\/search.json?&lang=en&q=France" } ]
- Loading branch information