Index: branches/5.1.x/core/kernel/processors/main_processor.php =================================================================== diff -u -N -r14264 -r14324 --- branches/5.1.x/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 14264) +++ branches/5.1.x/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 14324) @@ -1,6 +1,6 @@ NoDebug($params); if (isset($params['cache']) && $params['cache']) { $nextyear = intval(date('Y') + 1); @@ -930,7 +930,14 @@ set_time_limit(0); ini_set('memory_limit', -1); - return $this->Application->XMLHeader(getArrayValue($params, 'xml_version')); + if ( !$this->Application->GetVar('debug') ) { + return $this->Application->XMLHeader(getArrayValue($params, 'xml_version')); + } + + $lang =& $this->Application->recallObject('lang.current'); + header('Content-type: text/html; charset=' . $lang->GetDBField('Charset')); + + return ''; } function Header($params) @@ -940,8 +947,8 @@ function NoDebug($params) { - if (!$this->Application->GetVar('debug')) { - define('DBG_SKIP_REPORTING', 1); + if ( !$this->Application->GetVar('debug') ) { + safeDefine('DBG_SKIP_REPORTING', 1); } }