mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #8410 from lekoala/patch-13
FormField::debug should handle all types of values
This commit is contained in:
commit
2f67be61c1
@ -1326,13 +1326,14 @@ class FormField extends RequestHandler
|
|||||||
*/
|
*/
|
||||||
public function debug()
|
public function debug()
|
||||||
{
|
{
|
||||||
|
$strValue = is_string($this->value) ? $this->value : print_r($this->value, true);
|
||||||
return sprintf(
|
return sprintf(
|
||||||
'%s (%s: %s : <span style="color:red;">%s</span>) = %s',
|
'%s (%s: %s : <span style="color:red;">%s</span>) = %s',
|
||||||
static::class,
|
static::class,
|
||||||
$this->name,
|
$this->name,
|
||||||
$this->title,
|
$this->title,
|
||||||
$this->message,
|
$this->message,
|
||||||
$this->value
|
$strValue
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user