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! =)

Comments

greg.harvey’s picture

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.

greg.harvey’s picture

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
tayzlor’s picture

and this, can it be reviewed / applied?