Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mailchimp-3477468
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
mailchimp-3477468
Commits
b9910740
Commit
b9910740
authored
12 years ago
by
Stella Power
Committed by
Lev Tsypin
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
#1781672
by stella: Ensure merge vars array exists before looping over it.
parent
ff7c2f9c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/mailchimp_lists/mailchimp_lists.module
+7
-5
7 additions, 5 deletions
modules/mailchimp_lists/mailchimp_lists.module
with
7 additions
and
5 deletions
modules/mailchimp_lists/mailchimp_lists.module
+
7
−
5
View file @
b9910740
...
...
@@ -489,12 +489,14 @@ function mailchimp_lists_auth_newsletter_form(&$form, $list, $account) {
}
$mc_list
=
mailchimp_get_list
(
$list
->
mc_list_id
);
foreach
(
$mc_list
[
'mergevars'
]
as
$mergevar
)
{
// set the default value for merge fields if we have it
if
(
$mergevalues
&&
isset
(
$mergevalues
[
$mergevar
[
'tag'
]])
&&
$mergevalues
[
$mergevar
[
'tag'
]])
{
$mergevar
[
'default'
]
=
$mergevalues
[
$mergevar
[
'tag'
]];
if
(
!
empty
(
$mc_list
[
'mergevars'
]))
{
foreach
(
$mc_list
[
'mergevars'
]
as
$mergevar
)
{
// set the default value for merge fields if we have it
if
(
$mergevalues
&&
isset
(
$mergevalues
[
$mergevar
[
'tag'
]])
&&
$mergevalues
[
$mergevar
[
'tag'
]])
{
$mergevar
[
'default'
]
=
$mergevalues
[
$mergevar
[
'tag'
]];
}
$form
[
$wrapper_key
][
'mergevars'
][
$mergevar
[
'tag'
]]
=
mailchimp_lists_insert_drupal_form_tag
(
$mergevar
);
}
$form
[
$wrapper_key
][
'mergevars'
][
$mergevar
[
'tag'
]]
=
mailchimp_lists_insert_drupal_form_tag
(
$mergevar
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment