Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6cc7e1b

Browse files
committed
Update Whoops handling.
1 parent 98c0c3b commit 6cc7e1b

4 files changed

Lines changed: 22 additions & 8 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"classpreloader/classpreloader": "1.0.*",
1515
"doctrine/dbal": "2.4.x",
1616
"ircmaxell/password-compat": "1.0.*",
17-
"filp/whoops": "1.0.6",
17+
"filp/whoops": "1.0.7",
1818
"monolog/monolog": "1.5.*",
1919
"nesbot/carbon": "1.*",
2020
"patchwork/utf8": "1.1.*",

src/Illuminate/Exception/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
],
1010
"require": {
1111
"php": ">=5.3.0",
12-
"filp/whoops": "1.0.6",
12+
"filp/whoops": "1.0.7",
1313
"illuminate/support": "4.0.x",
1414
"symfony/http-foundation": "2.3.x",
1515
"symfony/http-kernel": "2.3.*"

src/Illuminate/Exception/resources/pretty-page.css

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ body {
99
}
1010
a {
1111
text-decoration: none;
12+
color: #FE8A59;
1213
}
1314

1415
.container{
@@ -17,6 +18,8 @@ body {
1718
position: fixed;
1819
margin: 0;
1920
padding: 0;
21+
left: 0;
22+
top: 0;
2023
}
2124

2225
.branding {
@@ -93,10 +96,15 @@ header {
9396
background: #F0E5DF;
9497
}
9598

96-
.frame-class, .frame-function {
99+
.frame-class, .frame-function, .frame-index {
97100
font-weight: bold;
98101
}
99102

103+
.frame-index {
104+
font-size: 11px;
105+
color: #BDBDBD;
106+
}
107+
100108
.frame-class {
101109
color: #ED591A;
102110
}
@@ -287,11 +295,15 @@ pre.prettyprint, code.prettyprint {
287295
text-decoration:none;
288296
}
289297

298+
.linenums li {
299+
color: #A5A5A5;
300+
}
301+
290302
.linenums li.current{
291303
background: rgba(255, 255, 255, .05);
292304
padding-top: 4px;
293305
padding-left: 1px;
294306
}
295307
.linenums li.current.active {
296308
background: rgba(255, 255, 255, .1);
297-
}
309+
}

src/Illuminate/Exception/resources/pretty-template.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
for that particular frame */ ?>
2727
<?php foreach($v->frames as $i => $frame): ?>
2828
<div class="frame <?php echo ($i == 0 ? 'active' : '') ?>" id="frame-line-<?php echo $i ?>">
29-
<div class="frame-method-info">
29+
<div class="frame-method-info">
30+
<span class="frame-index"><?php echo (count($v->frames) - $i - 1) ?>.</span>
3031
<span class="frame-class"><?php echo $e($frame->getClass() ?: '') ?></span>
3132
<span class="frame-function"><?php echo $e($frame->getFunction() ?: '') ?></span>
3233
</div>
@@ -81,7 +82,8 @@
8182
if($line !== null):
8283

8384
// the $line is 1-indexed, we nab -1 where needed to account for this
84-
$range = $frame->getFileLines($line - 8, 10);
85+
$range = $frame->getFileLines($line - 8, 10);
86+
$range = array_map(function($line){ return empty($line) ? ' ' : $line;}, $range);
8587
$start = key($range) + 1;
8688
$code = join("\n", $range);
8789
?>
@@ -97,7 +99,7 @@
9799
<?php extract($comment) ?>
98100
<div class="frame-comment" id="comment-<?php echo $i . '-' . $commentNo ?>">
99101
<span class="frame-comment-context"><?php echo $e($context) ?></span>
100-
<?php echo $e($comment) ?>
102+
<?php echo $e($comment, true) ?>
101103
</div>
102104
<?php endforeach ?>
103105
</div>
@@ -199,4 +201,4 @@
199201
});
200202
</script>
201203
</body>
202-
</html>
204+
</html>

0 commit comments

Comments
 (0)