Problem/Motivation
The following code on the WorkspaceListBuilder.php is causing this problem.'owner' => $entity->getOwner()->getDisplayName()
There is a chance to get a NULL value from the $entity->getOwner() function when there is no owner
Steps to reproduce
- Create a workspace with any of the users as owner
- Delete the user(workspace owner) using the following method "Delete the account and make its content belong to the Anonymous user."
- Visit workspaces listing page(admin/config/workflow/workspaces)
Proposed resolution
Make sure the value of $entity->getOwner() is not null before calling the getDisplayName() function
eg :
$owner = $entity->getOwner();
if ($owner instanceof UserInterface) {
// code
}