That confuses me. Okay, using language variables is correct (it wasn't clearly stated that it should be used in phpBB, so i just cleaned it up). But why do you use $user->lang in functions? Makes no sense to me. have a look in includes/functions.php at the function msg_handler(). $user is globaled there, and if $errno is E_USER_WARNING or E_USER_NOTICE, we have:

I think using $user->lang has nothing to do with it being inside a function (as that's not how variable scope works), but with the error level of the triggered error. A critical error, such as E_USER_ERROR would require using $user->lang, because it's not automatically converted.

eviL3 wrote:That confuses me. Okay, using language variables is correct (it wasn't clearly stated that it should be used in phpBB, so i just cleaned it up). But why do you use $user->lang in functions? Makes no sense to me. have a look in includes/functions.php at the function msg_handler(). $user is globaled there, and if $errno is E_USER_WARNING or E_USER_NOTICE, we have:

I think using $user->lang has nothing to do with it being inside a function (as that's not how variable scope works), but with the error level of the triggered error. A critical error, such as E_USER_ERROR would require using $user->lang, because it's not automatically converted.