Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
8134af0e
Commit
8134af0e
authored
May 11, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow using errorhandler from the app namespace
fixes #3431
parent
3ea2ffbb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
Application.php
framework/base/Application.php
+8
-0
No files found.
framework/base/Application.php
View file @
8134af0e
...
...
@@ -309,6 +309,14 @@ abstract class Application extends Module
echo
"Error: no errorHandler component is configured.
\n
"
;
exit
(
1
);
}
// allow using ErrorHandler from the app namespace
if
(
strncmp
(
$config
[
'components'
][
'errorHandler'
][
'class'
],
'app\\'
,
4
)
===
0
)
{
if
(
isset
(
$config
[
'basePath'
]))
{
Yii
::
setAlias
(
'@app'
,
$config
[
'basePath'
]);
}
else
{
throw
new
InvalidConfigException
(
'The "basePath" configuration for the Application is required.'
);
}
}
$this
->
set
(
'errorHandler'
,
$config
[
'components'
][
'errorHandler'
]);
unset
(
$config
[
'components'
][
'errorHandler'
]);
$this
->
getErrorHandler
()
->
register
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment