fix: wrong property declaration.

Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
Rubén D
2022-05-24 08:05:41 +02:00
parent 3b5c62f697
commit de0bc2a15b
2 changed files with 5 additions and 5 deletions

View File

@@ -75,7 +75,7 @@ $favoriteRouteOff = $_getvar('favoriteRouteOff');
class="btn-action"
data-action-route="<?php echo $_getvar('viewAccountRoute'); ?>"
data-item-id="<?php echo $accountSearchData->getId(); ?>"
data-onclick="account/view"><?php echo htmlspecialchars(accountSearchData->getName(), ENT_QUOTES); ?></a>
data-onclick="account/view"><?php echo htmlspecialchars($accountSearchData->getName(), ENT_QUOTES); ?></a>
<?php else: ?>
<div class="field-text">
<?php echo htmlspecialchars($accountSearchData->getName(), ENT_QUOTES); ?>

View File

@@ -33,10 +33,10 @@ defined('APP_ROOT') || die();
*/
class UserGroupData extends DataModelBase implements DataModelInterface
{
public int $id = 0;
public string $name;
public int $id = 0;
public ?string $name = null;
public ?string $description = null;
public ?array $users = null;
public ?array $users = null;
public function getId(): int
{
@@ -48,7 +48,7 @@ class UserGroupData extends DataModelBase implements DataModelInterface
$this->id = $id;
}
public function getName(): string
public function getName(): ?string
{
return $this->name;
}