Don't use t() inside define()
dereine - April 29, 2009 - 07:12
| Project: | Buy Me a Beer |
| Version: | 6.x-1.0 |
| Component: | Code |
| Category: | task |
| Priority: | critical |
| Assigned: | yaph |
| Status: | closed |
Jump to:
Description
You should never never use define together with the t function:
see http://drupal.org/node/317001
this is a performance disaster, the language cache is rebuild every time, so here is a patch
thx :)
perhaps the t function should be left of variable_get
| Attachment | Size |
|---|---|
| buymeabeer-not-definie-t.patch | 1.56 KB |

#1
Thanks for the patch. I removed the calls to t() within define calls and moved it to variable_get. Is there any evidence that t() should not be used in variable_get as well?
#2
#3
#4
Fixed in release buymeabeer 6.x-1.1-beta3 http://drupal.org/node/448228
#5
Automatically closed -- issue fixed for 2 weeks with no activity.