[ticket/12035] Adding necessary conditions

PHPBB3-12035