From 426469fc4ca6f6972e48ce9298cbb4ee7faa6dcf Mon Sep 17 00:00:00 2001 From: Joeke Kloosterman Date: Wed, 26 Apr 2017 11:02:41 +0200 Subject: [PATCH] Fix grid to show error when decrypting encrypted forms fails --- core/components/formit/processors/mgr/form/getlist.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/components/formit/processors/mgr/form/getlist.class.php b/core/components/formit/processors/mgr/form/getlist.class.php index a696cb80..a480dab8 100644 --- a/core/components/formit/processors/mgr/form/getlist.class.php +++ b/core/components/formit/processors/mgr/form/getlist.class.php @@ -43,6 +43,9 @@ public function prepareRow(xPDOObject $object) $values = $object->decrypt($ff['values']); if (!is_array(json_decode($values, true))) { $values = $object->decrypt($ff['values'], 1); + if (!is_array(json_decode($values, true))) { + $values = json_encode(array('error' => 'data corrupt')); + } } $ff['values'] = $values; }