Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function getValue()
*/
public function withValue($value): self
{
$this->checkArg("value", null === $value || $this->isClientSideValueOk($value), "Display value does not match input type.");
$this->checkArg("value", $this->isClientSideValueOk($value), "Display value does not match input type.");
$clone = clone $this;
foreach ($this->getInputs() as $k => $i) {
// note isClientSideValueOk() verifies the structure, there
Expand Down Expand Up @@ -132,6 +132,9 @@ protected function nameInputs(NameSource $source, string $parent_name): array
*/
protected function _isClientSideValueOk($value): bool
{
if ($value === null) {
return true;
}
if (!is_array($value)) {
return false;
}
Expand Down
Loading