The phpdoc on webform_submission_delete() claims that it wants $nid and $sid integers, but the code actually expects $node and $submission objects.

 145 /**
 146  * Delete a single submission.
 147  *
 148  * @param $nid
 149  *   ID of node for which this webform was submitted.
 150  * @param $sid
 151  *   ID of submission to be deleted (from webform_submitted_data).
 152  */
 153 function webform_submission_delete($node, $submission) {
 154   // Iterate through all components and let each do cleanup if necessary.
 155   foreach ($node->webform['components'] as $cid => $component) {
CommentFileSizeAuthor
#2 webform-2031541-2.patch765 bytesclaar

Comments

quicksketch’s picture

Priority: Normal » Minor

Thanks for the report! I think this problem affects the 3.x branches also.

claar’s picture

Assigned: Unassigned » claar
Status: Active » Needs review
StatusFileSize
new765 bytes

Patch against master.

quicksketch’s picture

Status: Needs review » Fixed

Thanks, committed!

Status: Fixed » Closed (fixed)

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