From 1eff78a1efa04a646247e1eaf86eb5e6a2039c78 Mon Sep 17 00:00:00 2001 From: Bogdan Abaev Date: Tue, 13 Jun 2023 12:08:31 -0400 Subject: [PATCH] truncate annotation page label instead of error --- model/Items.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/model/Items.inc.php b/model/Items.inc.php index df08d0c6..72005205 100644 --- a/model/Items.inc.php +++ b/model/Items.inc.php @@ -1849,12 +1849,13 @@ public static function updateFromJSON(Zotero_Item $item, case 'annotationText': case 'annotationComment': case 'annotationColor': - case 'annotationPageLabel': case 'annotationSortIndex': case 'annotationPosition': $item->$key = $val; break; - + case 'annotationPageLabel': + $item->$key = substr($val, 0, Zotero_Items::$maxAnnotationPageLabelLength); + break; case 'dateModified': if ($apiVersion >= 3 && $tmpZoteroClientDateModifiedHack) { $item->setField($key, $val);