mirror of
https://github.com/getgrav/grav.git
synced 2026-07-05 21:19:26 +02:00
Added check for bad JSON back (tracked down and fixed the issue in form plugin)
This commit is contained in:
@@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user