Skip to content

Commit 79ad7f1

Browse files
committed
fix: InvalidArgumentException Invalid parameter: nullable
1 parent 79e3316 commit 79ad7f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/DataCaster/DataCaster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public function castAs(mixed $value, string $field, string $method = 'get'): mix
159159
$params = array_map('trim', explode(',', $matches[2]));
160160
}
161161

162-
if ($isNullable) {
162+
if ($isNullable && ! $this->strict) {
163163
$params[] = 'nullable';
164164
}
165165

0 commit comments

Comments
 (0)