File tree 2 files changed +2
-7
lines changed
2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -200,11 +200,6 @@ public function toRequest($prependKey = true)
200
200
201
201
/** @var AutopilotField $field */
202
202
foreach ($ this ->fields as $ field ) {
203
- //TODO: how do you "unset" fields with Autopilot? Their API doesn't say anything about it
204
- if ($ field ->getValue () === null ) {
205
- continue ;
206
- }
207
-
208
203
if (! $ field ->isReserved ()) {
209
204
$ result ['custom ' ][$ field ->formatName ()] = $ field ->getValue ();
210
205
} else {
@@ -246,4 +241,4 @@ function jsonSerialize()
246
241
{
247
242
return $ this ->toArray ();
248
243
}
249
- }
244
+ }
Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ public function setValue($value)
229
229
}
230
230
231
231
// type of field is set in the constructor
232
- if ($ this ->getType () !== $ type ) {
232
+ if (( $ this ->getType () !== $ type) && ! is_null ( $ value ) ) {
233
233
throw AutopilotException::typeMismatch ($ this ->getType (), $ type );
234
234
}
235
235
You can’t perform that action at this time.
0 commit comments