I received three messages in the drupal log just after update (from previous version 1.3)

Invalid argument supplied for foreach() in C:\...\sites\all\modules\i18n\i18nstrings\i18nstrings.module on line 583.

All the errors report the same line.

Comments

Guty’s picture

Same issue here.
I got one line with:
"Invalid argument supplied for foreach() in /.../i18n/i18nstrings/i18nstrings.module on line 583."
I've also updated from 1.3 to 1.4.
Well, at least almost. I've added the patch from http://drupal.org/node/614548 #16 some time ago.

jose reyero’s picture

Status: Active » Fixed

This looks like the i18nblocks update and some edge case with old id = new id. Fixed in i18nstrings so it doesn't happen in next commits.

Nothing bad should happen, but refresh 'blocks strings' just to make sure everything is ok.

Status: Fixed » Closed (fixed)

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

acasi’s picture

Priority: Normal » Major
Issue tags: +T_VARIABLE

This might be a different one, I receive an error saying T_VARIABLE was unexpected in line 841 in a file called 'i18ntaxonomy.module' ... after updating to 6.x-1.9 (from 6.x-1.5).

If this is completely unrelated, please open as a new one.

I set the priority to major, as it won't let the webpage work anymore (unless 'downdating' the module back to 6.x-1.5).

acasi’s picture

function i18ntaxonomy_localize_terms($terms, $fields = array('name', 'description')) {
$localize = i18ntaxonomy_vocabulary(NULL, I18N_TAXONOMY_LOCALIZE);
foreach ($terms as $index => $term) {
if (in_array($term->vid, $localize)) {
// Clone objects just in case one of them is saved later

$terms[$index] = clone $term; //this line is the culprit!

foreach ($fields as $property) {
$terms[$index]->$property = i18nstrings("taxonomy:term:$term->tid:$property", $term->$property);
}
}
}
return $terms;
}