mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
value can be something else than a string
if the value is not a string (an array for instance), sprintf will fail
This commit is contained in:
parent
a31a496362
commit
f103648f8c
@ -1326,13 +1326,14 @@ class FormField extends RequestHandler
|
||||
*/
|
||||
public function debug()
|
||||
{
|
||||
$strValue = is_string($this->value) ? $this->value : print_r($this->value, true);
|
||||
return sprintf(
|
||||
'%s (%s: %s : <span style="color:red;">%s</span>) = %s',
|
||||
static::class,
|
||||
$this->name,
|
||||
$this->title,
|
||||
$this->message,
|
||||
$this->value
|
||||
$strValue
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user