Hi,

I think that locale_refresh_cache has a bug. The array $t is not initialized and so will be filled with translations from various languages. This may be intended? Anyway if the locale_* tables are empty, a NULL value will be stored into the cache, which will then look like non existant in the function locale() where ($cache == 0) is used to find out whether a cache entry exists. Unfortunately, NULL == 0.

Initializing $t = array() either before or within the foreach loop in locale_refresh_cache would make sense to me.

http://drupaldocs.org/api/head/function/locale_refresh_cache

CommentFileSizeAuthor
#1 locale_15.patch592 byteskilles@www.drop.org
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

killes@www.drop.org’s picture

Assigned: Unassigned » killes@www.drop.org
Status: Active » Needs review
FileSize
592 bytes

Indeed, we should initialize hat array.

killes@www.drop.org’s picture

Status: Needs review » Reviewed & tested by the community

Obvious, isn't it?

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)