Skip to content

Commit

Permalink
错误处理代码更新
Browse files Browse the repository at this point in the history
  • Loading branch information
lhs168 committed Jan 20, 2018
1 parent fbfe749 commit 9221035
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Fasim/Core/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ private function __construct() {

//初始化事件调度器
$this->eventDispatcher = new \Fasim\Event\EventDispatcher($this);
set_error_handler('\\Fasim\\Core\\Exception::errorHandler', E_ERROR | E_PARSE | E_STRICT);
$E_FILTER = E_ALL ^ E_NOTICE ^ E_USER_NOTICE;
if (version_compare(phpversion(), '5.4.0', '<')) {
$E_FILTER = $E_FILTER | E_STRICT;
}
set_error_handler('\\Fasim\\Core\\Exception::errorHandler', $E_FILTER);

}

Expand Down

0 comments on commit 9221035

Please sign in to comment.