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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3427115-2.patch | 527 bytes | cmarrufo |
| column-gid-null-error.png | 44.42 KB | cmarrufo | |
| getOwnerId-null.png | 61.48 KB | cmarrufo |
Comments
Comment #2
cmarrufo commentedAttached patch.
Comment #3
cmarrufo commentedComment #4
tobiasbFixed via release 8.x-1.7.