Open wfjsw opened 4 years ago
It is actually a PHP issue, but I have seen random characters in CharacterInfo.description broke the json_decode parser without any exception thrown, thus is difficult to debug.
CharacterInfo.description
json_decode
Solution part 1:
https://github.com/eveseat/eseye/blob/master/src/Containers/EsiResponse.php#L104 Add JSON_THROW_ON_ERROR flag to json_decode to make it easier to debug such error
JSON_THROW_ON_ERROR
Solution part 2:
Add a sanitizer as described in https://stackoverflow.com/questions/58674104/php-json-decode-does-not-work-with-single-unpaired-surrogate-caused-by-node-12-w
Not a clean way, though.
P.S. an example of such error: https://telemetry.eve.ac/share/issue/09f1abc0a4fb4bb09ee1f1f42b4474cb/
Note: we should consider these plain-text-response request when applying JSON_THROW_ON_ERROR, for example EsiStatus.
It is actually a PHP issue, but I have seen random characters in
CharacterInfo.description
broke thejson_decode
parser without any exception thrown, thus is difficult to debug.Solution part 1:
https://github.com/eveseat/eseye/blob/master/src/Containers/EsiResponse.php#L104 Add
JSON_THROW_ON_ERROR
flag to json_decode to make it easier to debug such errorSolution part 2:
Add a sanitizer as described in https://stackoverflow.com/questions/58674104/php-json-decode-does-not-work-with-single-unpaired-surrogate-caused-by-node-12-w
Not a clean way, though.
P.S. an example of such error: https://telemetry.eve.ac/share/issue/09f1abc0a4fb4bb09ee1f1f42b4474cb/