Calling i18n_taxonomy_translate_terms() with a term that is not translated yet (i18n_tsid == 0) produce a Fatal error:

PHP Fatal error: Call to a member function get_translations() on boolean in .../sites/all/modules/contrib/i18n/i18n_taxonomy/i18n_taxonomy.module on line 1030

1029:       $translation_set = i18n_translation_set_load($term->i18n_tsid);
1030:       $translations = $translation_set->get_translations();

This is because calling i18n_translation_set_load(0) returns FALSE instead of a i18n_translation_set object.

Attached patch adds a check before calling the get_translations method.

Comments

aborigeno created an issue. See original summary.

vdupom’s picture

vdupom’s picture

Status: Active » Needs review
jyraya’s picture

Hello,

I experienced the same issue and the patch #2 worked for me.

joseph.olstad’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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