[ticket/11824] Fix logic

PHPBB3-11824