The implementation of hook_node_delete() indiscriminately called db_delete() on deletion of any node. This should only be fired if the node being deleted is of the type 'webform'.

Comments

willvincent created an issue. See original summary.

willvincent’s picture

Status: Active » Needs review
StatusFileSize
new501 bytes

This patch wraps the existing db_delete() call in a conditional, so that it will only fire if the node being deleted is, in fact, a webform.

rschwab’s picture

Status: Needs review » Reviewed & tested by the community

A good addition. It has been functioning without error on my site in production for months.

  • Robert Castelo committed b7330e0 on 7.x-2.x
    Issue #2551083 by willvincent: db_delete() should only run if node being...
robert castelo’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in dev branch.

Patch did not take into consideration nodes created with content types that had been enabled to use Webform, so I changed the conditional to:

if (isset($node->webform)) {

Status: Fixed » Closed (fixed)

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