Skip to content
Open
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
2 changes: 1 addition & 1 deletion src/lib/Tab/LocationView/AuthorsTab.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private function supplyLastContributor(array &$parameters, VersionInfo $versionI
private function supplyCreator(array &$parameters, ContentInfo $contentInfo): void
{
$parameters['creator'] = null;
$ownerId = $contentInfo->getOwner()->getUserId();
$ownerId = $contentInfo->ownerId;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you figure out why is it different than getOwner()->getUserId()? We avoid magic whenever possible and that was also the intention behind this change. //POV ping @alongosz.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I didn't dig too deep, just saw we have used $contentInfo->ownerId and we don't have a getter for the ownerId either so I have just reverted to this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This supposed to be an equivalent, that's why I ask. I will let Andrew give his cents though.


if ((new UserExists($this->userService))->isSatisfiedBy($ownerId)) {
$parameters['creator'] = $this->userService->loadUser($ownerId);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/UI/Value/Content/VersionInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
class VersionInfo extends CoreVersionInfo
{
protected User $author;
protected ?User $author;

/** @var \Ibexa\Contracts\Core\Repository\Values\Content\Language[] */
protected array $translations;
Expand Down
Loading