Text: new form element type, catch type issues

fixes #1200
This commit is contained in:
Thomas Gelf 2019-07-08 15:01:53 +02:00
parent 1953a7b0f7
commit 4597ce2836
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
<?php
namespace Icinga\Module\Director\Web\Form\Element;
use Zend_Form_Element_Text as ZfText;
class Text extends ZfText
{
public function setValue($value)
{
if (\is_array($value)) {
$value = \json_encode($value);
}
return parent::setValue((string) $value);
}
}