Skip to content

Commit

Permalink
Fix string offset error in PHP 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Dec 30, 2011
1 parent 52f9d61 commit fc0c3c9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Cake/Utility/Debugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,10 @@ public function outputError($data) {
$data += $defaults;

$files = $this->trace(array('start' => $data['start'], 'format' => 'points'));
$code = $this->excerpt($files[0]['file'], $files[0]['line'] - 1, 1);
$code = '';
if (isset($files[0]['file'])) {
$code = $this->excerpt($files[0]['file'], $files[0]['line'] - 1, 1);
}
$trace = $this->trace(array('start' => $data['start'], 'depth' => '20'));
$insertOpts = array('before' => '{:', 'after' => '}');
$context = array();
Expand Down

0 comments on commit fc0c3c9

Please sign in to comment.