更新若干功能
This commit is contained in:
@@ -75,7 +75,14 @@ class MediaUrlService
|
||||
public function firstOf(mixed $value): string
|
||||
{
|
||||
if (is_array($value)) {
|
||||
$value = $value[0] ?? '';
|
||||
$first = $value[0] ?? '';
|
||||
if (is_array($first)) {
|
||||
$value = $first['url'] ?? $first['uid'] ?? '';
|
||||
} elseif (isset($value['url'])) {
|
||||
$value = $value['url'];
|
||||
} else {
|
||||
$value = $first;
|
||||
}
|
||||
}
|
||||
return $this->toStorage(is_string($value) ? $value : '');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user