[ticket/11840] Fix return statements

PHPBB3-11840