Skip to content

Commit 3667fc9

Browse files
committed
Fix null casting to database
1 parent e1cfd86 commit 3667fc9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Model.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ private function cast(string $type, $value)
124124
*/
125125
private function castToDatabase(string $type, $value)
126126
{
127-
if (gettype($value) === 'string') {
127+
if ($value === null || gettype($value) === 'string') {
128128
return $value;
129129
}
130130

0 commit comments

Comments
 (0)