Fix warnings on poll creation

This commit is contained in:
Olivier Perez 2016-05-03 22:02:09 +02:00
parent ab0748597a
commit 1e0a8b25bc
1 changed files with 2 additions and 1 deletions

View File

@ -56,7 +56,7 @@ if (isset($_GET['type']) && $_GET['type'] == 'date' ||
$goToStep2 = filter_input(INPUT_POST, GO_TO_STEP_2, FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => '/^(date|classic)$/']]);
if ($goToStep2) {
$title = $inputService->filterTitle($_POST['title']);
$customizeId = $inputService->filterBoolean($_POST['customize_id']);
$customizeId = isset($_POST['customize_id']) ? $inputService->filterBoolean($_POST['customize_id']) : false;
$id = $customizeId == true ? $inputService->filterId($_POST['id']) : null;
$name = $inputService->filterName($_POST['name']);
$mail = $config['use_smtp'] == true ? $inputService->filterMail($_POST['mail']) : null;
@ -77,6 +77,7 @@ if ($goToStep2) {
$error_on_description = false;
$error_on_password = false;
$error_on_password_repeat = false;
$error_on_id = false;
$_SESSION['form']->title = $title;
$_SESSION['form']->id = $id;