Skip to content
Permalink
Browse files

Avoid notice thrown in debug().

  • Loading branch information...
dereuromark committed Sep 16, 2014
1 parent 6e8f607 commit 21fbb97d9873da1d20456f64b35a660561e8119c
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/basics.php
@@ -52,7 +52,11 @@ function debug($var, $showHtml = null, $showFrom = true) {
$lineInfo = '';
if ($showFrom) {
$trace = Debugger::trace(array('start' => 1, 'depth' => 2, 'format' => 'array'));
$file = str_replace(array(CAKE_CORE_INCLUDE_PATH, ROOT), '', $trace[0]['file']);
$search = array(ROOT);
if (defined('CAKE_CORE_INCLUDE_PATH')) {
array_unshift($search, CAKE_CORE_INCLUDE_PATH);
}
$file = str_replace($search, '', $trace[0]['file']);
$line = $trace[0]['line'];
}
$html = <<<HTML

0 comments on commit 21fbb97

Please sign in to comment.
You can’t perform that action at this time.