From abd930ef56f3cc8a846558fd485f9a3d99fdb6ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=2E=20Nagy=20Gerg=C5=91?= Date: Tue, 27 Aug 2024 09:45:45 +0200 Subject: [PATCH] fix --- src/Models/Option.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Models/Option.php b/src/Models/Option.php index 13390408..9c462972 100644 --- a/src/Models/Option.php +++ b/src/Models/Option.php @@ -55,7 +55,10 @@ protected static function newFactory(): OptionFactory protected function casts(): array { return [ - 'value' => Root::instance()->options->resolveCast($this->key), + 'value' => match (true) { + is_null($this->key) => 'string', + default => Root::instance()->options->resolveCast($this->key), + }, ]; } }