Skip to content

Commit

Permalink
truncate annotation page label instead of error
Browse files Browse the repository at this point in the history
  • Loading branch information
abaevbog committed Jun 13, 2023
1 parent 2cf66c3 commit 1eff78a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions model/Items.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1eff78a

Please sign in to comment.