Merge pull request #8410 from lekoala/patch-13

FormField::debug should handle all types of values
This commit is contained in:
Robbie Averill 2018-09-26 14:30:55 +02:00 committed by GitHub
commit 2f67be61c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
); );
} }