From c2425f3c33a08a8efc5eb1ccecbe245935d649fc Mon Sep 17 00:00:00 2001 From: mulles Date: Tue, 7 May 2024 20:50:51 +0200 Subject: [PATCH] Update TrelloJsonService.php Fixes the following issue: https://github.com/nextcloud/deck/issues/5136 By fixing the following error when running 'php occ deck:import --system=TrelloJson' Error: Call to a member function getUID() on string in /home/sites/site100028002/web/nextcloud.enklaave.org/apps/deck/lib/Service/Importer/Systems/TrelloJsonService.php:136 and Error: Call to a member function getUID() on string in /home/sites/site100028002/web/nextcloud.enklaave.org/apps/deck/lib/Service/Importer/Systems/TrelloJsonService.php:364 Signed-off-by: mulles --- lib/Service/Importer/Systems/TrelloJsonService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Service/Importer/Systems/TrelloJsonService.php b/lib/Service/Importer/Systems/TrelloJsonService.php index a48b8ffe6..df716bde5 100644 --- a/lib/Service/Importer/Systems/TrelloJsonService.php +++ b/lib/Service/Importer/Systems/TrelloJsonService.php @@ -116,7 +116,7 @@ function (\stdClass $a) use ($trelloCard) { $cardId = $this->cards[$trelloCard->id]->getId(); $comment = new Comment(); if (!empty($this->getImportService()->getConfig('uidRelation')->{$trelloComment->memberCreator->username})) { - $actor = $this->getImportService()->getConfig('uidRelation')->{$trelloComment->memberCreator->username}->getUID(); + $actor = $this->getImportService()->getConfig('uidRelation')->{$trelloComment->memberCreator->username}; } else { $actor = $this->getImportService()->getConfig('owner')->getUID(); } @@ -344,7 +344,7 @@ private function translateColor(?string $color): string { private function replaceUsernames(string $text): string { foreach ($this->getImportService()->getConfig('uidRelation') as $trello => $nextcloud) { - $text = str_replace($trello, $nextcloud->getUID(), $text); + $text = str_replace($trello, $nextcloud, $text); } return $text; }