Problem with simplenews module where cron sends newsletters -- the relevant newsletter node has one language with translation enabled but no actual translation created yet. Errors seen in log each cron run and fails to send newsletters. The error is multiple copies of this php warning:
* warning: Invalid argument supplied for foreach() in ... modules/translation_management/icl_content/icl_content.module on line 1823.
Problem appears to be that it requires a translation to be present where in this case it isn't meaning the variable is not an array. I added the test
if (is_array($translation))
ahead of the foreach on line 1823 of file, and this stopped the error and allowed cron to run and newsletter to send as normal.

Comments

brucepearson’s picture

Status: Active » Fixed

Thanks, I've fixed this and it will be included in the next release.

Status: Fixed » Closed (fixed)
Issue tags: -PHP, -foreach(), -cron, -warning, -SimpleNews

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