diff --git a/cake/basics.php b/cake/basics.php index 58ee67c41..ae14bb2cf 100644 --- a/cake/basics.php +++ b/cake/basics.php @@ -98,7 +98,7 @@ TEXT; if (php_sapi_name() == 'cli') { $template = $text; } - if ($showHtml === null) { + if ($showHtml === null && $template !== $text) { $showHtml = true; } $var = print_r($var, true); diff --git a/cake/tests/cases/basics.test.php b/cake/tests/cases/basics.test.php index e3090938a..2c0282cb2 100644 --- a/cake/tests/cases/basics.test.php +++ b/cake/tests/cases/basics.test.php @@ -683,7 +683,7 @@ class BasicsTest extends CakeTestCase { $this->assertPattern($pattern, $result); ob_start(); - debug('
this-is-a-test
'); + debug('
this-is-a-test
', true); $result = ob_get_clean(); $pattern = '/(.+?tests(\/|\\\)cases(\/|\\\)basics\.test\.php|'; $pattern .= preg_quote(substr(__FILE__, 1), '/') . ')'; @@ -761,7 +761,7 @@ class BasicsTest extends CakeTestCase { * @return void */ public function testStripslashesDeepSybase() { - $this->skipUnless(ini_get('magic_quotes_sybase') === '1', '%s magic_quotes_sybase is off'); + $this->skipUnless(ini_get('magic_quotes_sybase') === '1', 'magic_quotes_sybase is off'); $this->assertEqual(stripslashes_deep("tes\'t"), "tes\'t");