From ca7a314c376dfcca66d11a6e9d3dcce46c255b31 Mon Sep 17 00:00:00 2001 From: Leny BERNARD Date: Wed, 11 Oct 2017 09:31:56 +0200 Subject: [PATCH] initialize $data as array --- Controller/FormController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Controller/FormController.php b/Controller/FormController.php index e006138..ea40254 100644 --- a/Controller/FormController.php +++ b/Controller/FormController.php @@ -41,6 +41,7 @@ public function addFormAnswerAction(Request $request) $_taintedValues = $request->request->all()['cms_form_content']; /** @var WidgetForm $widget */ $widget = $this->get('doctrine.orm.entity_manager')->getRepository('VictoireWidgetFormBundle:WidgetForm')->find($_taintedValues['id']); + $data = []; foreach ($_taintedValues['questions'] as $question) { if (in_array($question['type'], ['text', 'textarea', 'email']) && !empty($question[0])) {