- Issue created by @uv516
- Assigned to mohd sahzad
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 11:51am 27 October 2023 - last update
about 1 year ago 22 pass - 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
Could you not just add
&& is_object($submission)
to each of the existing two lines? Or perhapsisset()
should be!empty()
. - 🇩🇰Denmark uv516 Denmark
Mohd Sahzad 🐛 Attempt to read property uid [nid] on bool Needs review : I think your patch doesn't ensure that "$submission->uid", "$submission->sid" and "$node->uid" exist?
How is your patch better than the two suggestions I gave?:
$access_own_submission = !empty($submission) && !empty($submission->uid) && !empty($submission->sid) && user_access('access own webform submissions', $account) && (($account->uid && $account->uid == $submission->uid) || isset($_SESSION['webform_submission'][$submission->sid]));
and
$access_node_submissions = !empty($node->uid) && user_access('access own webform results', $account) && $account->uid == $node->uid;
- last update
about 1 year ago Patch Failed to Apply - Status changed to Needs work
about 1 year ago 5:33pm 29 October 2023