diff --git a/src/Models/AbstractAttribute.php b/src/Models/AbstractAttribute.php index 9943e3b6d..448e1ca86 100644 --- a/src/Models/AbstractAttribute.php +++ b/src/Models/AbstractAttribute.php @@ -70,7 +70,8 @@ protected function value(): Attribute return e(htmlspecialchars_decode($val), false); }, Arr::wrap($value)); - if (count($value) === 1) { + // NOTE: doing it this way properly returns null when there are no values + if (count($value) <= 1) { return Arr::first($value); }