Fix #1023 master

https://github.com/mybb/mybb/issues/1023
Merge pull request #1060 from Destroy666x/fix1023m

Fix #1023 master