Permalink
Browse files

Fix string offset error in PHP 5.4

  • Loading branch information...
1 parent 015f995 commit ed43c685b98d396ffb115169987eed7e9f576e28 @markstory markstory committed Dec 30, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/Cake/Utility/Debugger.php
@@ -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();

0 comments on commit ed43c68

Please sign in to comment.