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

Commit

Permalink
BUG: refs #318 Fixed ajax calls
Browse files Browse the repository at this point in the history
Fixed logger
  • Loading branch information
Charles Ma committed Oct 27, 2011
1 parent be25fcd commit 4ffdd54
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 1 addition & 6 deletions core/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ protected function _initConfig()
'datetime' => 'timestamp',
'module' => 'module');
$writerDb = new Zend_Log_Writer_Db($db, 'errorlog', $columnMapping);
if($config->environment == 'production')
if($configGlobal->environment == 'production')
{
$formatter = new Zend_Log_Formatter_Simple();
Zend_Loader_Autoloader::getInstance()->suppressNotFoundWarnings(false);
Expand All @@ -132,11 +132,6 @@ protected function _initConfig()
'writerParams' => array(
'stream' => './log/prod.log'),
'filterName' => 'Priority',
'filterParams' => array(
'priority' => Zend_Log::INFO)),
array(
'writerName' => 'Firebug',
'filterName' => 'Priority',
'filterParams' => array(
'priority' => Zend_Log::INFO))));
}
Expand Down
8 changes: 6 additions & 2 deletions core/controllers/components/NotifyErrorComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ public function fatalEror($logger, $mailer)
case 'production':
$message .= "It seems you have just encountered an unknown issue.";
$message .= "Our team has been notified and will deal with the problem as soon as possible.";
header('content-type: text/plain');
ob_clean();

if($e['type'] == E_NOTICE)
{
$e['typeText'] = 'E_NOTICE';
Expand Down Expand Up @@ -78,6 +77,11 @@ public function fatalEror($logger, $mailer)
{
return;
}
header('content-type: text/plain');
if(count(ob_list_handlers()) > 0)
{
ob_clean();
}
echo $message;
$this->_mailer = $mailer;
$this->_environment = $environment;
Expand Down

0 comments on commit 4ffdd54

Please sign in to comment.