diff --git a/lib/Cake/Test/Case/Utility/DebuggerTest.php b/lib/Cake/Test/Case/Utility/DebuggerTest.php index 6d7d9eca9..a456f9a4c 100644 --- a/lib/Cake/Test/Case/Utility/DebuggerTest.php +++ b/lib/Cake/Test/Case/Utility/DebuggerTest.php @@ -1,9 +1,5 @@ trace(array('start' => $data['start'], 'format' => 'points')); $code = ''; - if (isset($files[1]['file'])) { - $code = $this->excerpt($files[1]['file'], $files[1]['line'] - 1, 1); + $file = null; + if (isset($files[0]['file'])) { + $file = $files[0]; + } elseif (isset($files[1]['file'])) { + $file = $files[1]; + } + if ($file) { + $code = $this->excerpt($file['file'], $file['line'] - 1, 1); } $trace = $this->trace(array('start' => $data['start'], 'depth' => '20')); $insertOpts = array('before' => '{:', 'after' => '}');