Had the same error. Simply removed the blank lines at the end of my functions.php file after the closing PHP tag inside of the theme directory. Was getting the error after I put a second install of WordPress inside my existing WordPress site.
Note: the error may occur again if you have a WordPress install inside of another wordpress site. Make sure you edit both the new themes functions.php file as well as the original themes functions.php file to avoid any more future complications/errors.
The error can also be caused by tags being in front of your opening PHP tag, inside of your functions.php file. Remove the tags or reorder them if possible. Remove everything before your opening PHP tag. Lines, spaces, characters, other tags.
Some plugins will also cause this error. This error can prevent you from logging into your wordpress site. I had to use FTP to download my functions.php. I would reccomend FileZilla. Cheers and happy coding!