[ticket/7707] Remove unnecessary variables

PHPBB3-7707