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

Commit

Permalink
Correct misspelling of error component and fatal error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape committed Jun 18, 2014
1 parent 6b66205 commit 505852a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions core/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,12 @@ protected function _initConfig()
}
Zend_Registry::set('logger', $logger);

// Catch fatal errors
require_once BASE_PATH.'/core/controllers/components/NotifyErrorComponent.php';
$notifyErrorCompoenent = new NotifyErrorComponent();
// Init error handler
require_once BASE_PATH . '/core/controllers/components/NotifyErrorComponent.php';
$notifyErrorComponent = new NotifyErrorComponent();
ini_set('display_errors', 0);
register_shutdown_function(array($notifyErrorCompoenent, 'fatalEror'), $logger, new Zend_Mail());
set_error_handler(array($notifyErrorCompoenent, 'warningError'), E_NOTICE|E_WARNING);
register_shutdown_function(array($notifyErrorComponent, 'fatalError'), $logger, new Zend_Mail());
set_error_handler(array($notifyErrorComponent, 'warningError'), E_NOTICE | E_WARNING);

return $config;
}
Expand Down
8 changes: 4 additions & 4 deletions core/controllers/components/NotifyErrorComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public function initNotifier($environment, ArrayObject $error, Zend_Mail $mailer
$this->_server = $server;
}

/** Handle fatal Errors*/
public function fatalEror($logger, $mailer)
/** Handle fatal errors */
public function fatalError($logger, $mailer)
{
if(!is_null(error_get_last()))
{
Expand Down Expand Up @@ -155,7 +155,7 @@ public function fatalEror($logger, $mailer)
$logger->crit($this->getFatalErrorMessage($e));
$logger->__destruct();
}
} // end fatalEror
}

/** handle warning*/
public function warningError($errno, $errstr, $errfile, $errline)
Expand Down Expand Up @@ -244,7 +244,7 @@ public function getFatalErrorMessage($e)
return $message;
}

/** Create Exception message error*/
/** Create exception message error */
public function getFullErrorMessage()
{
$message = '';
Expand Down

0 comments on commit 505852a

Please sign in to comment.