diff --git a/lib/Db/TimelineWrite.php b/lib/Db/TimelineWrite.php index a1eceba7..415c4517 100644 --- a/lib/Db/TimelineWrite.php +++ b/lib/Db/TimelineWrite.php @@ -114,8 +114,12 @@ class TimelineWrite $exifJson = json_encode($exif); // Store error if data > 64kb - if (\strlen($exifJson) > 65535) { - $exifJson = json_encode(['error' => 'Exif data too large']); + if (\is_string($exifJson)) { + if (\strlen($exifJson) > 65535) { + $exifJson = json_encode(['error' => 'Exif data too large']); + } + } else { + $exifJson = json_encode(['error' => 'Exif data encoding error']); } if ($prevRow) {