Fix #1023 master

https://github.com/mybb/mybb/issues/1023