You missed the core of what I wrote. The Ajax call returns some text in some predetermined format (not always json). When there is a warning in that returned text the format no longer matches and you get the kind of message that you see.
However, this is half of the php warning - so completely useless. You need to have a look at the complete returned text or your error logs to see the complete message: problem x happened at line y in file z. I told you how to do that.