[drupal-devel] [bug] locale_refresh_cache bug

wiz drupal-devel at drupal.org
Fri Mar 25 17:33:56 UTC 2005

Issue status update for http://drupal.org/node/19444

 Project:      Drupal
 Version:      cvs
 Component:    locale.module
 Category:     bug reports
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  wiz
 Updated by:   wiz
 Status:       active

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.


More information about the drupal-devel mailing list