You can use the error_log
function to log an error to a file (or any details you want). This is testing code though, so you can just print to the screen.
In your send method before the return, issue a
. What's in there? If that turns up as a string of 0 length, issue a
and see what's in there instead.