Skip to content

Commit 2cb7ef8

Browse files
author
David Nahodyl
committed
better handling of null to convert to ''
1 parent 683d35e commit 2cb7ef8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Database/Eloquent/FMModel.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,11 @@ public function setAttribute($key, $value)
486486
$value = $value ? 1 : 0;
487487
}
488488

489+
// FileMaker can't handle null, so change it to ''
490+
if (is_null($value)){
491+
$value = '';
492+
}
493+
489494
$this->attributes[$key] = $value;
490495

491496
return $this;

0 commit comments

Comments
 (0)