hook_requirements should use get_t()

kiamlaluno - December 7, 2008 - 00:10
Project:RobotsTxt
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

hook_requirements() should not call t() directly, but use the value returned from get_t(); this is because when the hook is called, t() could not be available.

#1

kiamlaluno - December 7, 2008 - 00:35

See hook_requirements() documentation for more informations.

#2

kiamlaluno - December 23, 2008 - 10:30

The code is wrong because it uses the same code for both the installation, and the runtime phase. In the installation phase, t() is not available.

#3

hass - December 30, 2008 - 00:16

That's true. We also may need to move the hook to the .install file...

#4

hass - January 3, 2009 - 17:20
Status:active» fixed

#5

System Message - January 17, 2009 - 17:30
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.