Added headers_sent() check to header() call in main.php to stop it from being so brittle.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@67776 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-12-08 04:45:29 +00:00
parent d9b3abf8ac
commit 36561405c5

View File

@ -57,7 +57,7 @@ if($majorVersion < 5) {
*/
require_once("core/Core.php");
header("Content-type: text/html; charset=\"utf-8\"");
if(!headers_sent()) header("Content-type: text/html; charset=\"utf-8\"");
if (function_exists('mb_http_output')) {
mb_http_output('UTF-8');
mb_internal_encoding('UTF-8');