mirror of
https://github.com/getgrav/grav.git
synced 2026-02-23 15:11:27 +01:00
UserObject: allow incomplete file properties
This commit is contained in:
@@ -801,10 +801,10 @@ class UserObject extends FlexObject implements UserInterface, \Countable
|
||||
$imageFile = $originalMedia[$filename] ?? $thumbFile;
|
||||
if ($thumbFile && $imageFile) {
|
||||
$list[$filename] = [
|
||||
'name' => $info['name'],
|
||||
'type' => $info['type'],
|
||||
'size' => $info['size'],
|
||||
'path' => $info['path'],
|
||||
'name' => $info['name'] ?? null,
|
||||
'type' => $info['type'] ?? null,
|
||||
'size' => $info['size'] ?? null,
|
||||
'path' => $info['path'] ?? null,
|
||||
'image_url' => $imageFile->url(),
|
||||
'thumb_url' => $thumbFile->url(),
|
||||
'cropData' => (object)($imageFile->metadata()['upload']['crop'] ?? [])
|
||||
|
||||
Reference in New Issue
Block a user