Define default variable values in cases when they can be undefined

This commit is contained in:
Tautvidas Sipavičius
2019-01-23 21:29:46 +02:00
parent 3bfba7c642
commit 44bc27df90
6 changed files with 16 additions and 5 deletions

View File

@ -172,6 +172,7 @@ class Forms extends APIEndpoint {
// check if the user gets to pick his own lists
// or if it's selected by the admin
$has_segment_selection = false;
$list_selection = [];
foreach($body as $i => $block) {
if($block['type'] === 'segment') {
$has_segment_selection = true;