[ticket/12849] Fixed possible ReferenceError in core.js.

PHPBB3-12849
Merge pull request #2731 from callumacrae/ticket/12849-2

[ticket/12849] Fixed possible ReferenceError in core.js.

* callumacrae/ticket/12849-2:
  [ticket/12849] Fixed possible ReferenceError in core.js.
Merge branch 'develop-ascraeus' into develop

* develop-ascraeus:
  [ticket/12849] Fixed possible ReferenceError in core.js.