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 = [])
2626 {
2727 foreach (static ::$ fields as $ field => $ type )
2828 {
29- if (isset ($ initialValues [$ field ]))
29+ if (! empty ($ initialValues [$ field ]))
3030 {
3131 $ this ->setFields [$ field ] = true ;
3232 $ this ->data [$ field ] = $ initialValues [$ field ];
@@ -176,7 +176,7 @@ public function getData() : array
176176 }
177177 $ result [$ field ] = [];
178178
179- foreach ($ value as $ item )
179+ foreach ($ value as $ name => $ item )
180180 {
181181 if ($ item instanceof self)
182182 {
@@ -186,7 +186,7 @@ public function getData() : array
186186 {
187187 $ item = (string )$ item ;
188188 }
189- $ result [$ field ][] = $ item ;
189+ $ result [$ field ][$ name ] = $ item ;
190190 }
191191 }
192192 else
You can’t perform that action at this time.
0 commit comments