Problem/Motivation

When updating the module to the latest version available, and launching the drush updb command, for some strange reason I am having this error.

After some digging, I realized that the unpublished_node_permissions_node_access_records function is calling Node's getOwnerId() function to obtain the user ID of the specific node, but there may be cases where it can come as NULL, such as you can see in the images.

Proposed resolution

As a solution, I propose to use NULL coalesce, so that in the event that a NULL value (unsupported value) comes, assign a default value.

Comments

cmarrufo created an issue. See original summary.

cmarrufo’s picture

StatusFileSize
new527 bytes

Attached patch.

cmarrufo’s picture

Status: Active » Needs review
tobiasb’s picture

Status: Needs review » Fixed

Fixed via release 8.x-1.7.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.