From 7d249c61c2ee12e688c4d46a9451f2f220f7b769 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Tue, 8 Jan 2019 19:35:51 +0200 Subject: [PATCH] Added check for bad JSON back (tracked down and fixed the issue in form plugin) --- system/src/Grav/Framework/Flex/FlexForm.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/system/src/Grav/Framework/Flex/FlexForm.php b/system/src/Grav/Framework/Flex/FlexForm.php index bd7699aeb..df9e1edad 100644 --- a/system/src/Grav/Framework/Flex/FlexForm.php +++ b/system/src/Grav/Framework/Flex/FlexForm.php @@ -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"; } } }