cakephp/cakephp — pull request #5467 by dereuromark (2014-12-22 20:05:53+00:00)
Title: Don't send response from view.

When replacing a core from an older app (2.5) with 2.6, I noticed that the MediaView (fatal)errors now with

Error(256): [CakeException] Headers already sent in ...\lib\Cake\Network\CakeResponse.php on line 1475

This probably came with the addition of `@throws CakeException When headers have already been sent` in 2.6.
When removing the send() part, it worked fine again.

I think the view itself should not send either way.
Just render it, and the response will be sent from the controller layer automatically.