mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR #5943 Debug::text() boolean values are amended with (bool) so they don't get confused with "true" or "false" which could be strings (thanks Pigeon!) (from r111676)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112918 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2dca48ba09
commit
25af09b0f6
@ -136,6 +136,9 @@ class Debug {
|
|||||||
|
|
||||||
} else if (is_object($val)) {
|
} else if (is_object($val)) {
|
||||||
$val = var_export($val, true);
|
$val = var_export($val, true);
|
||||||
|
} else if (is_bool($val)) {
|
||||||
|
$val = $val ? 'true' : 'false';
|
||||||
|
$val = '(bool) ' . $val;
|
||||||
} else {
|
} else {
|
||||||
if(!Director::is_cli() && !Director::is_ajax()) {
|
if(!Director::is_cli() && !Director::is_ajax()) {
|
||||||
$val = "<pre style=\"font-family: Courier new\">" . htmlentities($val) . "</pre>\n";
|
$val = "<pre style=\"font-family: Courier new\">" . htmlentities($val) . "</pre>\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user