Browse Source

Fix failing tests.

Mark Story 11 years ago
parent
commit
f2970b22a6

+ 1 - 1
src/Template/Element/exception_stack_trace.ctp

@@ -46,7 +46,7 @@ foreach ($error->getTrace() as $i => $stack):
 		<a href="#" class="stack-frame-args" data-target="stack-args-<?= $i ?>">toggle arguments</a>
 
 		<table class="code-excerpt" cellspacing="0" cellpadding="0">
-		<?php $lineno = $stack['line'] - 4 ?>
+		<?php $lineno = isset($stack['line']) ? $stack['line'] - 4 : 0 ?>
 		<?php foreach ($excerpt as $l => $line): ?>
 			<tr>
 				<td class="excerpt-number" data-number="<?= $lineno + $l ?>"></td>

+ 1 - 1
tests/TestCase/Error/ExceptionRendererTest.php

@@ -484,7 +484,7 @@ class ExceptionRendererTest extends TestCase {
 					'plugin' => '',
 				)),
 				array(
-					'/<h2>Missing Method in PostsController<\/h2>/',
+					'/Missing Method in PostsController/',
 					'/<em>PostsController::index\(\)<\/em>/'
 				),
 				404