]> git.mxchange.org Git - friendica.git/commitdiff
Issue 14275: Avoid "Data too long" error
authorMichael <heluecht@pirati.ca>
Sun, 5 Jan 2025 21:35:06 +0000 (21:35 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 5 Jan 2025 21:35:06 +0000 (21:35 +0000)
src/Model/Photo.php

index a0d4d0873ed28a014ee77c031a24ecdc047fe668..30660cb56d73749eaa8d45529b70157e8e9f5bbf 100644 (file)
@@ -476,6 +476,8 @@ class Photo
                        'backend-ref' => $backend_ref
                ];
 
+               $fields = DI::dbaDefinition()->truncateFieldsForTable('photo', $fields);
+
                if (DBA::isResult($existing_photo)) {
                        $r = DBA::update('photo', $fields, ['id' => $existing_photo['id']]);
                } else {