Problem/motivation

Salesforce mapping module throws this error.

[error] Call to a member function id() on null

Steps to reproduce

While deleting the user using entityQuery, the module throws this error.

[error] Call to a member function id() on null

Proposed solution

Add the condition to check the mapping isn't empty.

Comments

mayurgajar created an issue. See original summary.

mohit.bansal623’s picture

Assigned: mayurgajar » Unassigned
Status: Active » Needs review
StatusFileSize
new1.96 KB

I have assigned the value in $nid and checking the condition for not empty. Please review the patch.

mayurgajar’s picture

StatusFileSize
new1.35 KB

Mapping id throws error of [error] Call to a member function id() on null
Added patch for same.

mayurgajar’s picture

StatusFileSize
new1.35 KB

DO NOT USE Patch: #3 as it has minor error of condition
Added new patch for issue : Mapping id throws error of [error] Call to a member function id() on null

mayurgajar’s picture

aaronbauman’s picture

Version: 8.x-4.x-dev » 5.0.x-dev
StatusFileSize
new1.41 KB

What is the reason not to delete the mapped object if the mapping doesn't exist?
I think, if the mapping does not exist, we should proceed with the mapped object delete.

avpaderno’s picture

Issue summary: View changes