[ticket/11522] Fixed errors specified in the PR

PHPBB3-11522