aboutsummaryrefslogtreecommitdiff
path: root/app/class/Bookmark.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/class/Bookmark.php')
-rw-r--r--app/class/Bookmark.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/class/Bookmark.php b/app/class/Bookmark.php
index 5c4d2fc..8b4d2f7 100644
--- a/app/class/Bookmark.php
+++ b/app/class/Bookmark.php
@@ -74,12 +74,11 @@ class Bookmark extends Item
public function setid($id): bool
{
if (is_string($id)) {
- try {
- $this->id = idclean($id, Model::MAX_ID_LENGTH, 1);
- } catch (\Throwable $th) {
- return false;
+ $id = idclean($id);
+ if (!empty($id)) {
+ $this->id = $id;
+ return true;
}
- return true;
}
return false;
}