From fff8cf1c34cdd244048d1d59f6ad2761b53e5698 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 5 Jan 2025 21:35:06 +0000 Subject: [PATCH] Issue 14275: Avoid "Data too long" error --- src/Model/Photo.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Model/Photo.php b/src/Model/Photo.php index a0d4d0873e..30660cb56d 100644 --- a/src/Model/Photo.php +++ b/src/Model/Photo.php @@ -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 {