mirror of
https://github.com/jbcr/core.git
synced 2026-04-28 03:03:10 +02:00
Use first element, regardless of index
This commit is contained in:
@@ -55,7 +55,7 @@ class FieldTranslation implements TranslationInterface
|
||||
|
||||
public function isEmpty(): bool
|
||||
{
|
||||
$value = is_iterable($this->value) ? $this->value[0] : $this->value;
|
||||
$value = is_iterable($this->value) ? current($this->value) : $this->value;
|
||||
|
||||
return empty($value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user