Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 4ffdd54

Browse files
author
Charles Ma
committed
BUG: refs #318 Fixed ajax calls
Fixed logger
1 parent be25fcd commit 4ffdd54

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

core/Bootstrap.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ protected function _initConfig()
122122
'datetime' => 'timestamp',
123123
'module' => 'module');
124124
$writerDb = new Zend_Log_Writer_Db($db, 'errorlog', $columnMapping);
125-
if($config->environment == 'production')
125+
if($configGlobal->environment == 'production')
126126
{
127127
$formatter = new Zend_Log_Formatter_Simple();
128128
Zend_Loader_Autoloader::getInstance()->suppressNotFoundWarnings(false);
@@ -132,11 +132,6 @@ protected function _initConfig()
132132
'writerParams' => array(
133133
'stream' => './log/prod.log'),
134134
'filterName' => 'Priority',
135-
'filterParams' => array(
136-
'priority' => Zend_Log::INFO)),
137-
array(
138-
'writerName' => 'Firebug',
139-
'filterName' => 'Priority',
140135
'filterParams' => array(
141136
'priority' => Zend_Log::INFO))));
142137
}

core/controllers/components/NotifyErrorComponent.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ public function fatalEror($logger, $mailer)
4848
case 'production':
4949
$message .= "It seems you have just encountered an unknown issue.";
5050
$message .= "Our team has been notified and will deal with the problem as soon as possible.";
51-
header('content-type: text/plain');
52-
ob_clean();
51+
5352
if($e['type'] == E_NOTICE)
5453
{
5554
$e['typeText'] = 'E_NOTICE';
@@ -78,6 +77,11 @@ public function fatalEror($logger, $mailer)
7877
{
7978
return;
8079
}
80+
header('content-type: text/plain');
81+
if(count(ob_list_handlers()) > 0)
82+
{
83+
ob_clean();
84+
}
8185
echo $message;
8286
$this->_mailer = $mailer;
8387
$this->_environment = $environment;

0 commit comments

Comments
 (0)