support default null value for blob type

This commit is contained in:
Pavel Merzlyakov 2023-07-04 13:57:39 +03:00
parent d8eaa98d13
commit 49ae517e9b
1 changed files with 3 additions and 0 deletions

View File

@ -332,6 +332,9 @@ function defaultValue(mtgMetaField $field)
} else if($type->isBool()) {
return $default ?? 'false';
} else if($type->isBlob()) {
if ($default == 'null') {
$default = 'nil';
}
return $default ?? 'nil';
} else {
throw new Exception("Unknown type '$type'");