Closed (fixed)
Project:
Internationalization
Version:
6.x-1.4
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Apr 2010 at 10:40 UTC
Updated:
22 Jun 2011 at 23:23 UTC
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
Comment #1
Guty commentedSame 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.
Comment #2
jose reyero commentedThis 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.
Comment #4
acasi commentedThis 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).
Comment #5
acasi commentedfunction 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;
}