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
a0def9c0
Commit
a0def9c0
authored
May 25, 2013
by
resurtm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better view/template variables naming and more superglobals.
parent
c5f54e5f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
14 deletions
+11
-14
ErrorHandler.php
framework/yii/base/ErrorHandler.php
+6
-9
callStackItem.php
framework/yii/views/errorHandler/callStackItem.php
+5
-5
main.php
framework/yii/views/errorHandler/main.php
+0
-0
No files found.
framework/yii/base/ErrorHandler.php
View file @
a0def9c0
...
...
@@ -95,19 +95,16 @@ class ErrorHandler extends Component
}
$view
=
new
View
();
$request
=
array
();
if
(
count
(
$_GET
)
>
0
)
{
$request
[]
=
'$_GET = '
.
var_export
(
$_GET
,
true
)
.
';'
;
$request
=
''
;
foreach
(
array
(
'GET'
,
'POST'
,
'SERVER'
,
'FILES'
,
'COOKIE'
,
'SESSION'
,
'ENV'
)
as
$name
)
{
if
(
!
empty
(
$GLOBALS
[
'_'
.
$name
]))
{
$request
.=
'$_'
.
$name
.
' = '
.
var_export
(
$GLOBALS
[
'_'
.
$name
],
true
)
.
";
\n\n
"
;
}
if
(
count
(
$_POST
)
>
0
)
{
$request
[]
=
'$_POST = '
.
var_export
(
$_POST
,
true
)
.
';'
;
}
$request
[]
=
'$_SERVER = '
.
var_export
(
$_SERVER
,
true
)
.
';'
;
$request
=
implode
(
"
\n\n
"
,
$request
);
$request
=
rtrim
(
$request
,
"
\n\n
"
);
echo
$view
->
renderFile
(
$this
->
mainView
,
array
(
'e'
=>
$exception
,
'e
xception
'
=>
$exception
,
'request'
=>
$request
,
'requestLinesCount'
=>
substr_count
(
$request
,
"
\n
"
),
),
$this
);
}
}
...
...
framework/yii/views/errorHandler/callStackItem.php
View file @
a0def9c0
...
...
@@ -7,16 +7,16 @@
* @var string[] $lines
* @var integer $begin
* @var integer $end
* @var \yii\base\ErrorHandler $c
* @var \yii\base\ErrorHandler $c
ontext
*/
$c
=
$this
->
context
;
$c
ontext
=
$this
->
context
;
?>
<li
class=
"
<?php
if
(
!
$c
->
isCoreFile
(
$file
))
echo
'application'
;
?>
call-stack-item"
>
<li
class=
"
<?php
if
(
!
$c
ontext
->
isCoreFile
(
$file
))
echo
'application'
;
?>
call-stack-item"
>
<div
class=
"element-wrap"
>
<div
class=
"element"
>
<span
class=
"number"
>
<?php
echo
(
int
)
$index
;
?>
.
</span>
<span
class=
"text"
>
in
<?php
echo
$c
->
htmlEncode
(
$file
);
?>
</span>
<span
class=
"text"
>
in
<?php
echo
$c
ontext
->
htmlEncode
(
$file
);
?>
</span>
<span
class=
"at"
>
at line
</span>
<span
class=
"line"
>
<?php
echo
(
int
)
$line
;
?>
</span>
</div>
...
...
@@ -28,7 +28,7 @@ $c = $this->context;
<?php
endfor
;
?>
<div
class=
"code"
>
<span
class=
"lines"
>
<?php
for
(
$i
=
$begin
;
$i
<=
$end
;
++
$i
)
echo
(
int
)
$i
.
'<br/>'
;
?>
</span>
<pre>
<?php
for
(
$i
=
$begin
;
$i
<=
$end
;
++
$i
)
echo
$c
->
htmlEncode
(
$lines
[
$i
]);
?>
</pre>
<pre>
<?php
for
(
$i
=
$begin
;
$i
<=
$end
;
++
$i
)
echo
$c
ontext
->
htmlEncode
(
$lines
[
$i
]);
?>
</pre>
</div>
</div>
</li>
framework/yii/views/errorHandler/main.php
View file @
a0def9c0
This diff is collapsed.
Click to expand it.
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