error message:
Fatal error: Cannot use object of type stdClass as array in […]\sites\all\modules\drupal-contrib\i18n\i18n.module on line 245

This error had also occured in beta2 in line 264.

the function containing line 245 reads:

243 function i18n_language_property($code, $property) {
244   $languages = language_list();
245   return isset($languages[$code][$property]) ? $languages[$code][$property] : NULL;
246 }

Reason:
i18n tries to access a language object as array.

Solution:

245   return isset($languages[$code]->$property) ? $languages[$code]->$property : NULL;

Comments

jose reyero’s picture

Status: Active » Fixed

Fixed, thanks

aboros@drupal.org’s picture

Version: 6.x-1.0-beta3 » 6.x-1.0-beta4
Status: Fixed » Active

just upgraded i18n to 6.x-1.0-beta4 and i still have the same error in the same line in i18n.module. i thought if this bug was fixed in beta3 it is fixed in beta4, but it's not, i had to edit the .module file to get rid of this bug.

jose reyero’s picture

Status: Active » Fixed

It is fixed in the dev version, right after beta4, I should have updated the bug version to beta4

Anonymous’s picture

Status: Fixed » Closed (fixed)

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