Skip to content

Commit

Permalink
修复
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft committed Oct 27, 2023
1 parent 3ed535d commit d21ec03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Model/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function __init(array $data = [], bool $queryRelation = true): void
$fieldAnnotation = null;
}
/** @var Column|null $fieldAnnotation */
if ($fieldAnnotation && isset(static::$__fieldInitParsers[$columnType = $fieldAnnotation->type]))
if ($fieldAnnotation && isset(static::$__fieldInitParsers[$columnType = $fieldAnnotation->type]) && \is_string($v))
{
$v = self::{static::$__fieldInitParsers[$columnType]}($k, $v, $fieldAnnotation, $meta);
}
Expand Down

0 comments on commit d21ec03

Please sign in to comment.