Download & Extend

t() function can't be invoked in hook_boot() - patch supplied

Project:Shared Sign-On
Version:6.x-1.3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

Please find attached a patch to fix the issue where a PHP fatal error is caused by line 170 of this module if someone attempts a hack. The developer attempts to wrap the message in the t() function, but it cannot be guaranteed available as the bootstrap order is arbitrary. If it is not available, a fatal error is caused. Easiest fix, don't wrap it in the t() function! =)

AttachmentSize
singlesignon_boot_t_patch-20081024.patch526 bytes

Comments

#1

Actually, correction - t() is core, so bootstrap is not the issue - rather using hook_boot() as opposed to hook_init(). Totally get why you do that, you *MUST* use hook_boot() but it means t() is not available because nothing has been initialised at that point.

#2

Title:t() function can't be invoked on a hack attempt» t() function can't be invoked in hook_boot() - patch supplied
Status:active» needs review

#3

and this, can it be reviewed / applied?