File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/ConstantContact/Definition Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public function __construct(array $initialValues = [])
26
26
{
27
27
foreach (static ::$ fields as $ field => $ type )
28
28
{
29
- if (isset ($ initialValues [$ field ]))
29
+ if (! empty ($ initialValues [$ field ]))
30
30
{
31
31
$ this ->setFields [$ field ] = true ;
32
32
$ this ->data [$ field ] = $ initialValues [$ field ];
@@ -176,7 +176,7 @@ public function getData() : array
176
176
}
177
177
$ result [$ field ] = [];
178
178
179
- foreach ($ value as $ item )
179
+ foreach ($ value as $ name => $ item )
180
180
{
181
181
if ($ item instanceof self)
182
182
{
@@ -186,7 +186,7 @@ public function getData() : array
186
186
{
187
187
$ item = (string )$ item ;
188
188
}
189
- $ result [$ field ][] = $ item ;
189
+ $ result [$ field ][$ name ] = $ item ;
190
190
}
191
191
}
192
192
else
You can’t perform that action at this time.
0 commit comments