if you are echo or print something from controller while return to view this problem will pop up. so make sure that you are not using echo or print when your controller returns