Problem/Motivation

When deleting nodes, in webform_localization_webform_component_delete, if a node has no translations and components are syncing, then a foreach() would receive a NULL to iterate on and a PHP Notice will occur:
Invalid argument supplied for foreach() in webform_localization/webform_localization.module line 195

Proposed resolution

Wrap the code in if ($translations) {}

Remaining tasks

Provide patch for 4.x

User interface changes

None

API changes

None

Comments

asgorobets’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.34 KB
asgorobets’s picture

Issue summary: View changes

Status: Needs review » Needs work

The last submitted patch, 1: webform_localization-2397109-1.patch, failed testing.

Status: Needs work » Needs review
joseph.olstad’s picture

Version: 7.x-1.x-dev » 7.x-4.x-dev

4x now, probably same issue, patch should still apply, btw, this is a duplicate but there's two patches, this one looks simpler. try this.

joseph.olstad’s picture

StatusFileSize
new1.34 KB

4x now, probably same issue, patch should still apply, btw, this is a duplicate but there's two patches, this one looks simpler.

same patch as patch 1 , just re uploading to trigger 4x simpletest

joseph.olstad’s picture

Status: Needs review » Fixed

Thanks asgorobets

Status: Fixed » Closed (fixed)

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