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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
6caad53a
Commit
6caad53a
authored
Apr 25, 2012
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unnecessary markup from error views
parent
b7e4bd31
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
26 deletions
+23
-26
error.php
framework/views/error.php
+7
-8
exception.php
framework/views/exception.php
+16
-18
No files found.
framework/views/error.php
View file @
6caad53a
...
...
@@ -8,11 +8,10 @@ $owner = $this->owner;
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<title>
<?php
echo
get_class
(
$exception
)
;
?>
</title>
<meta
charset=
"utf-8"
/>
<title>
<?php
echo
get_class
(
$exception
)
?>
</title>
<style
type=
"text/css"
>
/*<![
CDATA
[*/
<style>
body
{
font
:
normal
9pt
"Verdana"
;
color
:
#000
;
...
...
@@ -47,12 +46,11 @@ $owner = $this->owner;
padding-top
:
1em
;
margin-bottom
:
1em
;
}
/*]]>*/
</style>
</head>
<body>
<h1>
<?php
echo
get_class
(
$exception
)
;
?>
</h1>
<h1>
<?php
echo
get_class
(
$exception
)
?>
</h1>
<h2>
<?php
echo
nl2br
(
$owner
->
htmlEncode
(
$exception
->
getMessage
()))
?>
</h2>
<p>
The above error occurred while the Web server was processing your request.
...
...
@@ -61,8 +59,8 @@ $owner = $this->owner;
Please contact us if you think this is a server error. Thank you.
</p>
<div
class=
"version"
>
<?php
echo
date
(
'Y-m-d H:i:s'
,
time
())
;
?>
<?php
echo
YII_DEBUG
?
$owner
->
versionInfo
:
''
;
?>
<?php
echo
date
(
'Y-m-d H:i:s'
,
time
())
?>
<?php
echo
YII_DEBUG
?
$owner
->
versionInfo
:
''
?>
</div>
</body>
</html>
\ No newline at end of file
framework/views/exception.php
View file @
6caad53a
...
...
@@ -8,10 +8,9 @@ $owner = $this->owner;
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<title>
<?php
echo
get_class
(
$exception
);
?>
</title>
<style
type=
"text/css"
>
/*<![
CDATA
[*/
<meta
charset=
"utf-8"
/>
<title>
<?php
echo
get_class
(
$exception
)
?>
</title>
<style>
html
,
body
,
div
,
span
,
applet
,
object
,
iframe
,
h1
,
h2
,
h3
,
h4
,
h5
,
h6
,
p
,
blockquote
,
pre
,
a
,
abbr
,
acronym
,
address
,
big
,
cite
,
code
,
del
,
dfn
,
em
,
font
,
img
,
ins
,
kbd
,
q
,
s
,
samp
,
small
,
strike
,
strong
,
sub
,
sup
,
tt
,
var
,
b
,
u
,
i
,
center
,
dl
,
dt
,
dd
,
ol
,
ul
,
li
,
fieldset
,
form
,
label
,
legend
,
table
,
caption
,
tbody
,
tfoot
,
thead
,
tr
,
th
,
td
{
border
:
0
;
outline
:
0
;
font-size
:
100%
;
vertical-align
:
baseline
;
background
:
transparent
;
margin
:
0
;
padding
:
0
;}
body
{
line-height
:
1
;}
ol
,
ul
{
list-style
:
none
;}
...
...
@@ -156,13 +155,12 @@ $owner = $this->owner;
.trace-file
:hover
{
background
:
#f0ffff
;
}
/*]]>*/
</style>
</head>
<body>
<div
class=
"container"
>
<h1>
<?php
echo
get_class
(
$exception
)
;
?>
</h1>
<h1>
<?php
echo
get_class
(
$exception
)
?>
</h1>
<p
class=
"message"
>
<?php
echo
nl2br
(
$owner
->
htmlEncode
(
$exception
->
getMessage
()))
?>
...
...
@@ -170,26 +168,25 @@ $owner = $this->owner;
<div
class=
"source"
>
<p
class=
"file"
>
<?php
echo
$owner
->
htmlEncode
(
$exception
->
getFile
())
.
'('
.
$exception
->
getLine
()
.
')'
;
?>
<?php
echo
$owner
->
htmlEncode
(
$exception
->
getFile
())
.
'('
.
$exception
->
getLine
()
.
')'
?>
</p>
<?php
if
(
YII_DEBUG
)
$owner
->
renderSourceCode
(
$exception
->
getFile
(),
$exception
->
getLine
(),
$owner
->
maxSourceLines
)
;
?>
<?php
if
(
YII_DEBUG
)
$owner
->
renderSourceCode
(
$exception
->
getFile
(),
$exception
->
getLine
(),
$owner
->
maxSourceLines
)
?>
</div>
<?php
if
(
YII_DEBUG
)
:
?>
<?php
if
(
YII_DEBUG
)
:?>
<
div
class
="
traces
">
<h2>Stack Trace</h2>
<?php
$owner
->
renderTrace
(
$exception
->
getTrace
())
;
?>
<?php
$owner->renderTrace
(
$exception->getTrace
())?>
</div>
<?php
endif
;
?>
<?php endif?>
<div class="
version
">
<?php
echo
date
(
'Y-m-d H:i:s'
,
time
())
;
?>
<?php
echo
YII_DEBUG
?
$owner
->
versionInfo
:
''
;
?>
<?php echo date('Y-m-d H:i:s', time())?>
<?php echo YII_DEBUG ?
$owner->versionInfo
: ''?>
</div>
</div>
<script
type=
"text/javascript"
>
/*<![CDATA[*/
<script>
var traceReg = new RegExp("
(
^|
\
\s
)
trace
-
file
(
\
\s
|
$
)
");
var collapsedReg = new RegExp("
(
^|
\
\s
)
collapsed
(
\
\s
|
$
)
");
...
...
@@ -198,14 +195,15 @@ for(var j=0,len=e.length;j<len;j++){
if(traceReg.test(e[j].className)){
e[j].onclick = function(){
var trace = this.parentNode.parentNode;
if
(
collapsedReg
.
test
(
trace
.
className
))
if(collapsedReg.test(trace.className))
{
trace.className = trace.className.replace("
collapsed
", "
expanded
");
else
}
else{
trace.className = trace.className.replace("
expanded
", "
collapsed
");
}
}
}
}
/*]]>*/
</script>
</body>
...
...
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