Closed (fixed)
Project:
Drupal core
Version:
x.y.z
Component:
locale.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
25 Mar 2005 at 17:33 UTC
Updated:
15 Feb 2006 at 14:30 UTC
Jump to comment: Most recent file
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
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | locale_15.patch | 592 bytes | killes@www.drop.org |
Comments
Comment #1
killes@www.drop.org commentedIndeed, we should initialize hat array.
Comment #2
killes@www.drop.org commentedObvious, isn't it?
Comment #3
dries commentedCommitted to HEAD. Thanks.
Comment #4
(not verified) commented