Index: main_processor.php =================================================================== --- main_processor.php (revision 14184) +++ main_processor.php (working copy) @@ -899,7 +899,7 @@ function XMLTemplate($params) { - safeDefine('DBG_SKIP_REPORTING', 1); + $this->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); } }