mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Making debug() not html escape in cli contexts.
This commit is contained in:
parent
19bcec599b
commit
72245ebb0c
2 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -683,7 +683,7 @@ class BasicsTest extends CakeTestCase {
|
|||
$this->assertPattern($pattern, $result);
|
||||
|
||||
ob_start();
|
||||
debug('<div>this-is-a-test</div>');
|
||||
debug('<div>this-is-a-test</div>', 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");
|
||||
|
||||
|
|
Loading…
Reference in a new issue