Fix #1617 Sanitize input from MyBB server

Fix #1617 Sanitize input from MyBB server
Latest code should always be an integer value, shouldn't it? Might as well just cast to integer here.