Skip to content

Commit 1df65bf

Browse files
authored
Merge pull request #10 from Bit-Apps-Pro/fix/type-casting-issue
fix: data type casting issue
2 parents 993f8e3 + 629517a commit 1df65bf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Model.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,10 @@ private static function getInstance()
437437

438438
private function castTo($column, $value)
439439
{
440+
if (\is_null($value)) {
441+
return $value;
442+
}
443+
440444
if (
441445
!isset($this->casts)
442446
|| (isset($this->casts) && !isset($this->casts[$column]))

0 commit comments

Comments
 (0)