Index: branches/5.2.x/core/kernel/processors/main_processor.php =================================================================== diff -u -N -r14572 -r14585 --- branches/5.2.x/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 14572) +++ branches/5.2.x/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 14585) @@ -1,6 +1,6 @@ NoDebug($params); if (isset($params['cache']) && $params['cache']) { $nextyear = intval(date('Y') + 1); @@ -942,7 +942,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 ''; } protected function _requestHeaders() @@ -975,8 +982,8 @@ function NoDebug($params) { - if (!$this->Application->GetVar('debug')) { - define('DBG_SKIP_REPORTING', 1); + if ( !$this->Application->GetVar('debug') ) { + kUtil::safeDefine('DBG_SKIP_REPORTING', 1); } }