Skip to content

Commit

Permalink
initialize $data as array
Browse files Browse the repository at this point in the history
  • Loading branch information
lenybernard authored Oct 11, 2017
1 parent f20f97d commit ca7a314
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Controller/FormController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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])) {
Expand Down

0 comments on commit ca7a314

Please sign in to comment.