mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
PHRAS-3628 : 500 on API.create record
fix error 500 on api_v3 / records / POST with no file (dbox.records.type should be "unknown", not null)
This commit is contained in:
@@ -1876,7 +1876,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
|
||||
$stmt->execute([
|
||||
':coll_id' => $collection->get_coll_id(),
|
||||
':parent_record_id' => 0,
|
||||
':type' => $file ? ($file->getType() ? $file->getType()->getType() : 'unknown') : null,
|
||||
':type' => $file ? ($file->getType() ? $file->getType()->getType() : 'unknown') : 'unknown',
|
||||
':sha256' => $file ? $file->getMedia()->getHash('sha256') : null,
|
||||
':uuid' => $file ? $file->getUUID(true) : null,
|
||||
':originalname' => $file ? $file->getOriginalName() : null,
|
||||
|
Reference in New Issue
Block a user