[ticket/12572] Fix JS error when alert message title is undefined

JS console reports error in core.js:
TypeError: alert is undefined
alert.hide()
when res.MESSAGE_TITLE is undefined.

PHPBB3-12572