Fix php error when getting invalid response data.