[ticket/13192] Pass correct parameters and rename method to get_valid_page

PHPBB3-13192