[ticket/12597] Fix coding style and typing mistakes

PHPBB3-12597