Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions lib/Db/ObjectEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -703,12 +703,6 @@ public function jsonSerialize(): array
$object['id'] = $this->uuid;
}

// Ensure organisation is always accessible at top level (not just in @self).
// Organisation should NEVER be null - it should always have at least the default organisation.
if (($this->organisation ?? null) !== null) {
$object['organisation'] = $this->organisation;
}

// Let's merge and return.
return $object;
}//end jsonSerialize()
Expand Down
8 changes: 6 additions & 2 deletions lib/Service/File/TaggingHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ public function attachTagsToFile(string $fileId, array $tags=[]): void
foreach ($tags as $tag) {
// Check if tag exists by trying to get it by name.
try {
$tagObj = $this->systemTagManager->getTagsByIds([$tag]);
$tagObj = false;
if (ctype_digit($tag) === true) {
$tagObj = $this->systemTagManager->getTagsByIds([$tag]);
}

if (empty($tagObj) === false) {
// Tag exists (found by ID), just use its ID.
$newTagIds[] = $tag;
Expand All @@ -117,7 +121,7 @@ public function attachTagsToFile(string $fileId, array $tags=[]): void
} catch (Exception $e) {
$this->logger->error(
message: '[TaggingHandler] Error processing tag '.$tag.': '.$e->getMessage(),
context: ['file' => __FILE__, 'line' => __LINE__]
context: ['file' => __FILE__, 'line' => __LINE__, 'trace' => $e->getTrace()]
);
// Try to create it anyway.
try {
Expand Down
Loading