mirror of
https://github.com/friendica/friendica
synced 2025-01-10 07:24:43 +00:00
Issue 14275: Avoid "Data too long" error
This commit is contained in:
parent
7a7a74d93e
commit
fff8cf1c34
1 changed files with 2 additions and 0 deletions
|
@ -476,6 +476,8 @@ class Photo
|
||||||
'backend-ref' => $backend_ref
|
'backend-ref' => $backend_ref
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$fields = DI::dbaDefinition()->truncateFieldsForTable('photo', $fields);
|
||||||
|
|
||||||
if (DBA::isResult($existing_photo)) {
|
if (DBA::isResult($existing_photo)) {
|
||||||
$r = DBA::update('photo', $fields, ['id' => $existing_photo['id']]);
|
$r = DBA::update('photo', $fields, ['id' => $existing_photo['id']]);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue