Commit 92b8a70a authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Nikita Hovratov
Browse files

[BUGFIX] Prevent property mapping error in BackendUserGroup DTO

This adds a constructor to the BackendUserGroup DTO,
allowing the extbase ObjectConverter to determine the
correct target type of the "title" property.

Additionally, some cleanup in the DTO is done.

Resolves: #99708
Releases: main
Change-Id: I318e2ea30edee5f38e286ddf95603a983e681de2
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77595


Reviewed-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
Tested-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
parent d3432d5d
......@@ -22,12 +22,14 @@ namespace TYPO3\CMS\Beuser\Domain\Dto;
*/
class BackendUserGroup
{
protected string $title = '';
public function __construct(protected string $title = '')
{
}
public static function fromUc(array $uc): self
{
$demand = new self();
$demand->title = $uc['title'] ?? '';
$demand->title = (string)($uc['title'] ?? '');
return $demand;
}
......@@ -39,7 +41,7 @@ class BackendUserGroup
public function forUc(): array
{
return [
'title' => $this->getTitle(),
'title' => $this->title,
];
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment