From 73429b357f06cd76f35d81482dd789b1737fe2b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Markovi=C4=87?= Date: Fri, 4 Nov 2011 14:58:06 +0100 Subject: [PATCH] Fixed inconsistent debug parameters and empty '(line )' --- lib/Cake/basics.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/Cake/basics.php b/lib/Cake/basics.php index e5b1f3ccb..6424374df 100644 --- a/lib/Cake/basics.php +++ b/lib/Cake/basics.php @@ -76,6 +76,7 @@ function debug($var = false, $showHtml = null, $showFrom = true) { if (Configure::read('debug') > 0) { $file = ''; $line = ''; + $lineInfo = ''; if ($showFrom) { $calledFrom = debug_backtrace(); $file = substr(str_replace(ROOT, '', $calledFrom[0]['file']), 1); @@ -83,32 +84,39 @@ function debug($var = false, $showHtml = null, $showFrom = true) { } $html = << -%s (line %s) +%s
 %s
 
HTML; - $text = <<%s (line %s)', $file, $line); + } } - printf($template, $file, $line, $var); + printf($template, $lineInfo, $var); } }