summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/ActiveControls')
-rw-r--r--framework/Web/UI/ActiveControls/TActivePageAdapter.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/framework/Web/UI/ActiveControls/TActivePageAdapter.php b/framework/Web/UI/ActiveControls/TActivePageAdapter.php
index 5e86f8b8..d90d0997 100644
--- a/framework/Web/UI/ActiveControls/TActivePageAdapter.php
+++ b/framework/Web/UI/ActiveControls/TActivePageAdapter.php
@@ -347,7 +347,13 @@ class TCallbackErrorHandler extends TErrorHandler
if($this->getApplication()->getMode()===TApplication::STATE_DEBUG)
{
$response = $this->getApplication()->getResponse();
- $trace = TJavaScript::jsonEncode($this->getExceptionStackTrace($exception));
+ $trace = $this->getExceptionStackTrace($exception);
+ try {
+ $trace = TJavaScript::jsonEncode($trace);
+ } catch (Exception $e) {
+ // strip everythin not 7bit ascii
+ $trace = preg_replace('/[^(\x20-\x7F)]*/','', serialize($trace));
+ }
$response->setStatusCode(500, 'Internal Server Error');
$response->appendHeader(TActivePageAdapter::CALLBACK_ERROR_HEADER.': '.$trace);
}