I just find sometimes jsonResult.php can’t return json result correctly, but nothing.(html and xml results work perfectly)
For example: The path is jsonResult.php?test=151229_ZR_Z4
in jsonResult.php file, I can see:
json_response($ret);
I var_dump($ret) and get a large array, but json_response($ret) returns nothing.
I guess it’s because the size of my array is too big, and json_encode can’t accept the large array.
Maybe it’s a bug, is there a quick solution to solve it?
Thanks
Hi, thanks for reply. yes, it’s a private instance.
it’s a good idea. but there is nothing in the error log.
I added json_last_error() in the jsonResult.php, and got the output is 5, which is JSON_ERROR_UTF8
[hr]
After I utf8_encode the array, json_response finally output the json.
oh, sorry, I forget to add some words at the first: json_response doesn’t always return nothing, just seldom.
At beginning, I thought there are some special characters in the array items. But, I use mb_detect_encoding and find almost all the items in the array are in ASCII
for example:
151227_DE_CB
1500
Sun, 27 Dec 2015 07:33:00 +0000