Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: killes@www.drop.org commentedIndeed, we should initialize hat array.
Comment #2
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedObvious, isn't it?
Comment #3
Dries CreditAttribution: Dries commentedCommitted to HEAD. Thanks.
Comment #4
(not verified) CreditAttribution: commented