Added check for bad JSON back (tracked down and fixed the issue in form plugin)

This commit is contained in:
Matias Griese
2019-01-08 19:35:51 +02:00
parent a224c8b348
commit 7d249c61c2

View File

@@ -634,8 +634,7 @@ class FlexForm implements FlexFormInterface
$value = json_decode($value, true);
if ($value === null && json_last_error() !== JSON_ERROR_NONE) {
unset($data[$key]);
// FIXME: check broken JSON inputs
//$this->errors[] = "Badly encoded JSON data (for {$key}) was sent to the form";
$this->errors[] = "Badly encoded JSON data (for {$key}) was sent to the form";
}
}
}