FIX Debug::text no longer incorrecty returns "ViewableData_debugger"

This commit is contained in:
Daniel Hensby 2015-03-23 14:52:18 +00:00
parent 06ccac1a2b
commit 72bb9a2087

View File

@ -125,7 +125,12 @@ class Debug {
} }
if($hasDebugMethod) { if($hasDebugMethod) {
return $val->debug(); $debug = $val->debug();
// Conditional not necessary after 3.2. See https://github.com/silverstripe/silverstripe-framework/pull/4034
if ($debug instanceof ViewableData_Debugger) {
$debug = $debug->forTemplate();
}
return $debug;
} }
} }