[ticket/11924] Do not use globals :(

PHPBB3-11924